diff --git a/sample.confd b/sample.confd index 486252b03c72da72c88db661d71c4d36f5b9e16d..726269524b1a98aca320ae812ce8b98949c58694 100644 --- a/sample.confd +++ b/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 diff --git a/sample.initd b/sample.initd index 0dc706ce27dbcf80bf504fd41a03973cf6fd6eb5..1fcf9b3b296fd894f0e91b88345bce24a79db7c7 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_background="yes" +: ${command_user:="<USER>"} -start_stop_daemon_args="--user $sample_user:$sample_group" -pidfile="/run/$name.pid" +command="/usr/sbin/<SERVICE>" +command_args="$command_args" +command_background="yes" +pidfile="/run/$RC_SVCNAME.pid" depend() { need net