aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shellinabox/shellinabox.initd
blob: 8ef176fa96f0197e19eb6b37676a6660229d1fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 $?
}