aboutsummaryrefslogblamecommitdiffstats
path: root/community/althttpd/althttpd.initd
blob: c32869b2ffaa2f1ef488f7fcf33675da350690b3 (plain) (tree)




























                                                                
#!/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"
}