~dricottone/huttese-apk

ref: cb49312d467441202ff6897ab4ebad71fc7ba204 huttese-apk/sr.ht/fcgiwrap/fcgiwrap.initd -rw-r--r-- 574 bytes
cb49312d — Drew DeVault Add hg.sr.ht-webhooks service 5 years ago
                                                                                
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
#!/sbin/openrc-run

name="fcgiwrap"
description="fcgiwrap cgi daemon"

command="/usr/bin/fcgiwrap"
command_args="-c 3 -s unix:/var/run/fcgiwrap/fcgiwrap.sock"
command_background="yes"
pidfile="/var/run/fcgiwrap/fcgiwrap.pid"
user="fcgiwrap"
group="www-data"

depend() {
	need net localmount
	after firewall
}

start() {
	checkpath --directory --owner fcgiwrap:www-data ${pidfile%/*}
	ebegin "Starting ${name}"
	start-stop-daemon --exec ${command} \
		--pidfile ${pidfile} --make-pidfile \
		--background \
		-u ${user} -g ${group} \
		--start -- ${command_args}
	eend $?
}