Redis init script is peventing clean Raspbian reboot #1007

Open
Pitel opened this Issue Mar 15, 2013 · 2 comments

Comments

Projects
None yet
2 participants

Pitel commented Mar 15, 2013

Raspbian is a fork of Debian for Raspberry Pi. Since installation of Redis server, scheduled reboot from cron stoped to work. After removing of Redis init scripts, reboot is ok again.

See Raspberry Pi forum for further information.

Owner

antirez commented Mar 15, 2013

Hello, is the init script the same we provide in the Redis distribution? Could you please provide a copy of the file? Thanks.

Pitel commented Mar 15, 2013

Yes, it was created using the provided utility.

#/bin/sh
 #Configurations injected by install_server below....

 EXEC=/usr/local/bin/redis-server
 CLIEXEC=/usr/local/bin/redis-cli
 PIDFILE=/var/run/redis_6379.pid
 CONF="/etc/redis/6379.conf"

 REDISPORT="6379"

 ###############



case "$1" in
    start)
        if [ -f $PIDFILE ]
        then
                echo "$PIDFILE exists, process is already running or crashed"
        else
                echo "Starting Redis server..."
                $EXEC $CONF
        fi
        ;;
    stop)
        if [ ! -f $PIDFILE ]
        then
                echo "$PIDFILE does not exist, process is not running"
        else
                PID=$(cat $PIDFILE)
                echo "Stopping ..."
                $CLIEXEC -p $REDISPORT shutdown
                while [ -x /proc/${PID} ]
                do
                    echo "Waiting for Redis to shutdown ..."
                    sleep 1
                done
                echo "Redis stopped"
        fi
        ;;
    *)
        echo "Please use start or stop as first argument"
        ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment