Commit 799c8d53 authored by Jakub Jirutka's avatar Jakub Jirutka Committed by Natanael Copa

sample.initd: modernize

parent 8c92572b
#!/sbin/runscript
#!/sbin/openrc-run
# Sample init.d file for alpine linux.
name=
daemon=/usr/sbin/$name
command="/usr/sbin/$name"
command_args="$sample_opts"
command_background="yes"
start_stop_daemon_args="--user $sample_user:$sample_group"
pidfile="/run/$name.pid"
depend() {
need net
after firewall
}
start() {
ebegin "Starting ${name}"
start-stop-daemon --start --quiet \
--pidfile /var/run/${name}.pid \
--chuid ${sample_user}:${sample_group} \
--exec ${daemon} -- ${sample_opts}
eend $?
}
stop() {
ebegin "Stopping ${name}"
start-stop-daemon --stop --quiet \
--pidfile /var/run/$name.pid \
--exec ${daemon}
eend $?
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment