sample.*: improve sample init script

This commit is contained in:
Jakub Jirutka 2023-06-21 15:34:27 +02:00
parent 6ef31d9e99
commit 8efe527ff3
2 changed files with 15 additions and 12 deletions

View File

@ -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

View File

@ -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