Skip to content

Instantly share code, notes, and snippets.

@grauwoelfchen
Last active January 1, 2016 12:59
Show Gist options
  • Save grauwoelfchen/8148383 to your computer and use it in GitHub Desktop.
Save grauwoelfchen/8148383 to your computer and use it in GitHub Desktop.
Openrc runscript for hubot runner script.
#!/sbin/runscript
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
need redis
# need ngircd
need localmount
}
start() {
ebegin "Starting my hubot"
exec sudo -u hubot /var/srv/hubot/bin/my-hubot start
eend $?
}
stop() {
ebegin "Stopping my hubot"
exec sudo -u hubot /var/srv/hubot/bin/my-hubot stop
eend $?
}
restart() {
stop
sleep 3
start
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment