diff --git a/sample.confd b/sample.confd index 486252b..7262695 100644 --- a/sample.confd +++ b/sample.confd @@ -1,7 +1,10 @@ -# Sample conf.d file for alpine linux +# Configuration for /etc/init.d/ -# -# Specify daemon options here. -# +# User (and group) to run as. +#command_user="" -sample_opts="" +# Additional arguments for daemon. +#command_args= + +# Comment out to disable process supervisor. +supervisor=supervise-daemon diff --git a/sample.initd b/sample.initd index 0dc706c..1fcf9b3 100644 --- a/sample.initd +++ b/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:=""} + +command="/usr/sbin/" +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