Skip to content

Instantly share code, notes, and snippets.

@FAST-JE
Created April 10, 2020 21:38
Show Gist options
  • Select an option

  • Save FAST-JE/fbb8e9023f0636e0158fc2b36d243ebb to your computer and use it in GitHub Desktop.

Select an option

Save FAST-JE/fbb8e9023f0636e0158fc2b36d243ebb to your computer and use it in GitHub Desktop.
CENTRIFUGO=/usr/bin/centrifugo
CENTRIFUGO_ARGS="--config=/etc/centrifugo/config.json --log_file=/var/log/centrifugo.log"
PIDFILE=/var/run/centrifugo.pid
case "$1" in
start)
echo -n "Starting Centrifugo"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $CENTRIFUGO -- $CENTRIFUGO_ARGS
echo "."
;;
stop)
echo -n "Stopping Centrifugo"
start-stop-daemon --stop --quiet --pidfile $PIDFILE
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/centrifugo {start|stop|restart}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment