1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/althttpd/althttpd.initd
2021-02-19 20:49:58 +00:00

29 lines
488 B
Text

#!/sbin/openrc-run
# user-servicable parts go in /etc/conf.d/althttpd
pidfile=/var/run/althttpd.pid
depend() {
need net
}
start() {
ebegin "Starting althttpd"
cd /
start-stop-daemon \
--start --exec /usr/bin/althttpd \
--pidfile ${pidfile} \
--make-pidfile \
--background \
-- \
${ALTHTTPD_OPTS}
eend $? "Failed to start althttpd"
}
stop() {
ebegin "Stopping althttpd"
start-stop-daemon --retry 10 --stop --pidfile ${pidfile}
eend $? "Failed to stop althttpd"
}