2009-01-29 09:06:43 +00:00
|
|
|
#!/sbin/runscript
|
|
|
|
|
|
|
|
# Sample init.d file for alpine linux.
|
|
|
|
|
2009-12-30 08:55:33 +00:00
|
|
|
name=
|
|
|
|
daemon=/usr/sbin/$name
|
2009-01-29 09:06:43 +00:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
2009-12-30 08:55:33 +00:00
|
|
|
after firewall
|
2009-01-29 09:06:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2009-12-30 08:55:33 +00:00
|
|
|
ebegin "Starting ${name}"
|
2009-07-01 13:20:21 +00:00
|
|
|
start-stop-daemon --start --quiet \
|
2009-12-30 08:55:33 +00:00
|
|
|
--pidfile /var/run/${name}.pid \
|
|
|
|
--chuid ${sample_user}:${sample_group} \
|
|
|
|
--exec ${daemon} -- ${sample_opts}
|
2009-01-29 09:06:43 +00:00
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2009-12-30 08:55:33 +00:00
|
|
|
ebegin "Stopping ${name}"
|
2009-01-29 09:06:43 +00:00
|
|
|
start-stop-daemon --stop --quiet \
|
2009-12-30 08:55:33 +00:00
|
|
|
--pidfile /var/run/$name.pid \
|
|
|
|
--exec ${daemon}
|
2009-01-29 09:06:43 +00:00
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|