aboutsummaryrefslogtreecommitdiffstats
path: root/main/minetest/minetest.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/minetest/minetest.initd')
-rw-r--r--main/minetest/minetest.initd37
1 files changed, 37 insertions, 0 deletions
diff --git a/main/minetest/minetest.initd b/main/minetest/minetest.initd
new file mode 100644
index 0000000000..cf47b81a54
--- /dev/null
+++ b/main/minetest/minetest.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+
+description="Minetest server"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting $SVCNAME"
+ start-stop-daemon \
+ --start \
+ --user $USER \
+ --group $GROUP \
+ --make-pidfile \
+ --pidfile $PID \
+ --background \
+ --quiet \
+ --exec $EXEC -- "--config $CONFIG --logfile $LOG $ARGS"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $SVCNAME"
+ start-stop-daemon \
+ --stop \
+ --quiet \
+ --pidfile $PID
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading $SVCNAME"
+ start-stop-daemon --signal HUP \
+ --exec "$EXEC" --pidfile "$PID"
+ eend $?
+}