Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed REDISPORT => KeyDBPORT #241

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
JohnSully marked this conversation as resolved.
Show resolved Hide resolved
### 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"
Comment on lines +18 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably these dirs should change? @JohnSully

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea good point.


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