blob: a8bca09a9641c142f74dbadb1bd3b294142c2102 (
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
26
27
28
29
30
31
32
33
34
35
|
#!/sbin/openrc-run
description="Minetest server"
pidfile="/var/run/$SVCNAME.pid"
command="/usr/bin/minetestserver"
start_stop_daemon_args="--user ${USER:-minetest} --group ${GROUP:-games}
--make-pidfile --pidfile $pidfile --background --quiet --wait 300"
command_args="$ARGS"
depend() {
need net
after firewall
}
optional_command_arg() {
if [ -n "$2" ]; then
command_args="$command_args $1 $2"
fi
}
start_pre() {
optional_command_arg --log $LOG
optional_command_arg --config $CONFIG
optional_command_arg --gameid $GAMEID
}
reload() {
ebegin "Reloading $SVCNAME"
start-stop-daemon --signal HUP \
--exec "$EXEC" --pidfile "$pidfile"
eend $?
}
|