sample.initd 473 Bytes
Newer Older
1 2 3 4
#!/sbin/runscript

# Sample init.d file for alpine linux.

5 6
name=
daemon=/usr/sbin/$name
7 8 9

depend() {
	need net
10
	after firewall
11 12 13
}

start() {
14
	ebegin "Starting ${name}"
15
		start-stop-daemon --start --quiet \
16 17 18
			--pidfile /var/run/${name}.pid \
			--chuid ${sample_user}:${sample_group} \
			--exec ${daemon} -- ${sample_opts}
19 20 21 22
	eend $?
}

stop() {
23
	ebegin "Stopping ${name}"
24
		start-stop-daemon --stop --quiet \
25 26
			--pidfile /var/run/$name.pid \
			--exec ${daemon}
27 28 29
	eend $?
}