aboutsummaryrefslogtreecommitdiffstats
path: root/main/minetest/minetest.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2014-12-29 16:13:56 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2014-12-29 16:14:10 +0000
commit52c3cd0153a87c05d8d6f9631ddeabe1188d3fae (patch)
treebf91dbdc179be683506c19eadf23e0ba5a8257dd /main/minetest/minetest.initd
parent7f92358cd30647fe2487a7dcaa1f7b2680c1c6c0 (diff)
downloadaports-52c3cd0153a87c05d8d6f9631ddeabe1188d3fae.tar.bz2
aports-52c3cd0153a87c05d8d6f9631ddeabe1188d3fae.tar.xz
main/minetest: added initd and conf file
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 $?
+}