aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hyperrc/hyperbot
blob: 4878ce6e844e4761f3fd709978243e082657fc85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 $?
}