diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/hyperrc/hyperbot | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/hyperrc/hyperbot b/contrib/hyperrc/hyperbot new file mode 100644 index 0000000..4878ce6 --- /dev/null +++ b/contrib/hyperrc/hyperbot @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +command="/srv/hyperbot/hyperbot" +command_args="start" +command_user="hyperbot" + +depend() { + need net +} + +start_pre() { + checkpath --directory --owner "$command_user" "/srv/hyperbot" +} + +start() { + ebegin "Starting #hyperbola bot" + start-stop-daemon --start --exec "$command" --user "$command_user" + eend $? +} + +stop() { + ebegin "Stopping #hyperbola bot" + start-stop-daemon --stop --exec "$command" --user "$command_user" + eend $? +} |