Skip to content

Instantly share code, notes, and snippets.

@neerajnagi
Last active May 18, 2016 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neerajnagi/d79f6006a2f87de2f82bc13c6ff1e06c to your computer and use it in GitHub Desktop.
Save neerajnagi/d79f6006a2f87de2f82bc13c6ff1e06c to your computer and use it in GitHub Desktop.
RPI

stop redis-server

/etc/init.d/redis-server stop

copy redis.sh to /admin forever start --uid "redis" -c /bin/bash /admin/redis.sh

Your shell script (/admin/redis.sh) looks like

#!/bin/sh
exec /usr/bin/redis-server

check redis respawn by killing redis pid

remove redis service from chkconfig

sudo update-rc.d -f redis-server remove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment