diff options
Diffstat (limited to 'games-action/minetest/files/minetestserver.initd')
-rw-r--r-- | games-action/minetest/files/minetestserver.initd | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/games-action/minetest/files/minetestserver.initd b/games-action/minetest/files/minetestserver.initd new file mode 100644 index 0000000..e0a33d9 --- /dev/null +++ b/games-action/minetest/files/minetestserver.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +description="Minetest dedicated server" + +depend() { + need net +} + +start() { + ebegin "starting server" + start-stop-daemon \ + --start \ + --quiet \ + --make-pidfile \ + --pidfile "${PIDFILE}" \ + --background \ + --user ${USER} \ + --group ${GROUP} \ + --exec "${MINETESTBIN}" -- ${ARGS} + + eend $? +} + +stop() { + ebegin "stopping server" + start-stop-daemon \ + --stop \ + --signal 15 \ + --quiet \ + --pidfile "${PIDFILE}" + + eend $? +} |