diff options
| author | Julien Reichardt <mi@jrei.ch> | 2017-11-20 23:45:51 +0100 | 
|---|---|---|
| committer | William Hubbs <w.d.hubbs@gmail.com> | 2017-11-29 15:06:06 -0600 | 
| commit | ddbdb696582e9fd61995f15d6a3a53055a151e41 (patch) | |
| tree | e024598751b72733b7274b9bbe221b7e90694215 /sh | |
| parent | c84ebb94d19ca856fe064e15d2068d5671e360c9 (diff) | |
| download | openrc-ddbdb696582e9fd61995f15d6a3a53055a151e41.tar.xz | |
add more variables for start-stop-daemon and supervise-daemon options
Add the following variables to expose more arguments that can be passed
to start-stop-daemon or supervise-daemon:
- directory will be passed to --chdir
- error_log will be passed to --stderr
- output_log will be passed to --stdout
- umask will be passed to umask
This is for #184.
Diffstat (limited to 'sh')
| -rw-r--r-- | sh/start-stop-daemon.sh | 4 | ||||
| -rw-r--r-- | sh/supervise-daemon.sh | 4 | 
2 files changed, 8 insertions, 0 deletions
| diff --git a/sh/start-stop-daemon.sh b/sh/start-stop-daemon.sh index 0793b19a..35c642c0 100644 --- a/sh/start-stop-daemon.sh +++ b/sh/start-stop-daemon.sh @@ -44,9 +44,13 @@ ssd_start()  	eval start-stop-daemon --start \  		--exec $command \  		${chroot:+--chroot} $chroot \ +		${directory:+--chdir} $directory \ +		${output_log+--stdout} $output_log \ +		${error_log+--stderr} $error_log \  		${procname:+--name} $procname \  		${pidfile:+--pidfile} $pidfile \  		${command_user+--user} $command_user \ +		${umask+--umask} $umask \  		$_background $start_stop_daemon_args \  		-- $command_args $command_args_background  	if eend $? "Failed to start ${name:-$RC_SVCNAME}"; then diff --git a/sh/supervise-daemon.sh b/sh/supervise-daemon.sh index f6e599d5..b600b9c6 100644 --- a/sh/supervise-daemon.sh +++ b/sh/supervise-daemon.sh @@ -24,12 +24,16 @@ supervise_start()  	# to work properly.  	eval supervise-daemon "${RC_SVCNAME}" --start \  		${retry:+--retry} $retry \ +		${directory:+--chdir} $directory  \  		${chroot:+--chroot} $chroot \ +		${output_log+--stdout} ${output_log} \ +		${error_log+--stderr} $error_log \  		${pidfile:+--pidfile} $pidfile \  		${respawn_delay:+--respawn-delay} $respawn_delay \  		${respawn_max:+--respawn-max} $respawn_max \  		${respawn_period:+--respawn-period} $respawn_period \  		${command_user+--user} $command_user \ +		${umask+--umask} $umask \  		$supervise_daemon_args \  		$command \  		-- $command_args $command_args_foreground | 
