Skip to content

Instantly share code, notes, and snippets.

@paulomcnally
Last active December 29, 2018 03:37
Show Gist options
  • Select an option

  • Save paulomcnally/6fad2b4e3bd5c491cbb2b3bdc770fd79 to your computer and use it in GitHub Desktop.

Select an option

Save paulomcnally/6fad2b4e3bd5c491cbb2b3bdc770fd79 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Start/stop the homebridges daemon.
#
### BEGIN INIT INFO
# Provides: homebridges
# Required-Start: $remote_fs $syslog $time
# Required-Stop: $remote_fs $syslog $time
# Should-Start: $network $named slapd autofs ypbind nscd nslcd winbind
# Should-Stop: $network $named slapd autofs ypbind nscd nslcd winbind
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: homebridges daemon
# Description: homebridges auto start
### END INIT INFO
case "$1" in
start)
DEBUG=alexa* /home/pi/.nvm/versions/node/v10.14.2/bin/node /home/pi/.nvm/versions/node/v10.14.2/bin/homebridge -I
;;
stop)
;;
*)
echo "Usage: /etc/init.d//etc/init.d/homebridges {start|stop}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment