~dricottone/huttese-apk

ref: 7c65fd1a7220c46301eeb832265d85fae85341db huttese-apk/sr.ht/fcgiwrap/fcgiwrap.initd -rw-r--r-- 574 bytes
7c65fd1a — Drew DeVault Fix supervisor in meta.sr.ht init scripts 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 $?
}