2015-02-27 00:58:55 +00:00
|
|
|
#!/sbin/runscript
|
2015-08-22 11:49:06 +00:00
|
|
|
# Copyright 1999-2013 Gentoo Foundation
|
2015-02-27 00:58:55 +00:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-22 11:49:06 +00:00
|
|
|
# $Id$
|
2015-02-27 00:58:55 +00:00
|
|
|
|
|
|
|
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 $?
|
|
|
|
}
|