Skip to content

Redis init script is peventing clean Raspbian reboot #1007

Open

Description

@Pitel

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.

Activity

  1. antirez commented on Mar 15, 2013

    @antirez
    Contributor

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

  2. Pitel commented on Mar 15, 2013

    @Pitel
    Author

    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
  3. added a commit that references this issue on Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions