aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shellinabox/shellinabox.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2017-04-06 09:44:09 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2017-04-06 09:44:14 +0000
commitc6de00c5d5ea3f3112a76cf787a1d64a188414d5 (patch)
tree9703b90edf5b0b12c00a660cc46257895e7e34fa /testing/shellinabox/shellinabox.initd
parenteff85e8c6163511b40826467e5d7890ac4e99ff8 (diff)
downloadaports-c6de00c5d5ea3f3112a76cf787a1d64a188414d5.tar.bz2
aports-c6de00c5d5ea3f3112a76cf787a1d64a188414d5.tar.xz
testing/shellinabox: new aport
Diffstat (limited to 'testing/shellinabox/shellinabox.initd')
-rw-r--r--testing/shellinabox/shellinabox.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/shellinabox/shellinabox.initd b/testing/shellinabox/shellinabox.initd
new file mode 100644
index 0000000000..8ef176fa96
--- /dev/null
+++ b/testing/shellinabox/shellinabox.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Removed start_pre since full of bashism
+
+my_daemon="shellinaboxd"
+pidfile="/var/run/${my_daemon}/${my_daemon}.pid"
+command="/usr/bin/${my_daemon}"
+command_args="${SIAB_OPTS}"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting ${my_daemon}"
+ start-stop-daemon \
+ --start \
+ --background \
+ --pidfile ${pidfile} \
+ --make-pidfile \
+ --exec ${command} \
+ -- ${command_args}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${my_daemon}"
+ start-stop-daemon \
+ --stop \
+ --pidfile ${pidfile}
+ eend $?
+}