Skip to content

Commit

Permalink
Renamed REDISPORT => KeyDBPORT
Browse files Browse the repository at this point in the history
Signed-off-by: Hanif Bin Ariffin <[email protected]>
  • Loading branch information
hbina committed Oct 4, 2020
1 parent b042495 commit cc67725
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions utils/redis_init_script → utils/keydb_init_script
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#!/bin/sh
#
# Simple Redis init.d script conceived to work on Linux systems
# Simple KeyDB init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.

### BEGIN INIT INFO
# Provides: redis_6379
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Redis data structure server
# Description: Redis data structure server. See https://redis.io
# Short-Description: KeyDB data structure server
# Description: KeyDB data structure server. See https://redis.io
### END INIT INFO

REDISPORT=6379
KEYDBPORT=6379
EXEC=/usr/local/bin/keydb-server
CLIEXEC=/usr/local/bin/keydb-cli

PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/${REDISPORT}.conf"
PIDFILE=/var/run/redis_${KEYDBPORT}.pid
CONF="/etc/redis/${KEYDBPORT}.conf"

case "$1" in
start)
if [ -f $PIDFILE ]
then
echo "$PIDFILE exists, process is already running or crashed"
else
echo "Starting Redis server..."
echo "Starting KeyDB server..."
$EXEC $CONF
fi
;;
Expand All @@ -35,13 +35,13 @@ case "$1" in
else
PID=$(cat $PIDFILE)
echo "Stopping ..."
$CLIEXEC -p $REDISPORT shutdown
$CLIEXEC -p $KEYDBPORT shutdown
while [ -x /proc/${PID} ]
do
echo "Waiting for Redis to shutdown ..."
echo "Waiting for KeyDB to shutdown ..."
sleep 1
done
echo "Redis stopped"
echo "KeyDB stopped"
fi
;;
*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ case "$1" in
else
PID=$(cat $PIDFILE)
echo "Stopping ..."
$CLIEXEC -p $REDISPORT shutdown
$CLIEXEC -p $KeyDBPORT shutdown
while [ -x /proc/${PID} ]
do
echo "Waiting for Redis to shutdown ..."
Expand Down

0 comments on commit cc67725

Please sign in to comment.