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>
# # User (and group) to run <SERVICE> as.
# Specify daemon options here. #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 #!/sbin/openrc-run
# Sample init.d file for alpine linux. name="SampleService"
description="Sample init.d file for Alpine Linux"
name= : ${command_user:="<USER>"}
command="/usr/sbin/$name"
command_args="$sample_opts" command="/usr/sbin/<SERVICE>"
command_args="$command_args"
command_background="yes" command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="--user $sample_user:$sample_group"
pidfile="/run/$name.pid"
depend() { depend() {
need net need net