sample.*: improve sample init script
This commit is contained in:
parent
6ef31d9e99
commit
8efe527ff3
13
sample.confd
13
sample.confd
|
@ -1,7 +1,10 @@
|
|||
# Sample conf.d file for alpine linux
|
||||
# Configuration for /etc/init.d/<SERVICE>
|
||||
|
||||
#
|
||||
# Specify daemon options here.
|
||||
#
|
||||
# User (and group) to run <SERVICE> as.
|
||||
#command_user="<USER>"
|
||||
|
||||
sample_opts=""
|
||||
# Additional arguments for <SERVICE> daemon.
|
||||
#command_args=
|
||||
|
||||
# Comment out to disable process supervisor.
|
||||
supervisor=supervise-daemon
|
||||
|
|
14
sample.initd
14
sample.initd
|
@ -1,14 +1,14 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
# Sample init.d file for alpine linux.
|
||||
name="SampleService"
|
||||
description="Sample init.d file for Alpine Linux"
|
||||
|
||||
name=
|
||||
command="/usr/sbin/$name"
|
||||
command_args="$sample_opts"
|
||||
: ${command_user:="<USER>"}
|
||||
|
||||
command="/usr/sbin/<SERVICE>"
|
||||
command_args="$command_args"
|
||||
command_background="yes"
|
||||
|
||||
start_stop_daemon_args="--user $sample_user:$sample_group"
|
||||
pidfile="/run/$name.pid"
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
|
|
Loading…
Reference in New Issue