X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/d8fc1ec5f984b7ab6a7886e054c9dd272d3678b1..ec302a3290d82fab860a5c274aad21ff6e297f0f:/cookbooks/supybot/templates/default/supybot.init.erb diff --git a/cookbooks/supybot/templates/default/supybot.init.erb b/cookbooks/supybot/templates/default/supybot.init.erb new file mode 100644 index 000000000..1b107588e --- /dev/null +++ b/cookbooks/supybot/templates/default/supybot.init.erb @@ -0,0 +1,24 @@ +#!/bin/bash + +# DO NOT EDIT - This file is being maintained by Chef + +start() { + start-stop-daemon --start --chuid supybot --background --make-pidfile --pidfile /var/run/supybot.pid --exec /usr/bin/supybot -- /etc/supybot/supybot.conf +} + +stop() { + start-stop-daemon --stop --retry 300 --pidfile /var/run/supybot.pid +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop || exit $? + start + ;; +esac