~dricottone/huttese-apk

ref: 6c9d9861e1b26b3accfe0534f1fedf8dcebc03f5 huttese-apk/sr.ht/fcgiwrap/fcgiwrap.initd -rw-r--r-- 574 bytes
6c9d9861 — Drew DeVault Update git.sr.ht arch to "all" 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 $?
}