diff options
Diffstat (limited to 'devel/forgejo-runner/files/act_runner.in')
| -rw-r--r-- | devel/forgejo-runner/files/act_runner.in | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/devel/forgejo-runner/files/act_runner.in b/devel/forgejo-runner/files/act_runner.in index fa243278cc7e..7bb6e2a96978 100644 --- a/devel/forgejo-runner/files/act_runner.in +++ b/devel/forgejo-runner/files/act_runner.in @@ -24,17 +24,19 @@ load_rc_config "${name}" : ${act_runner_cache_dir:="%%DATADIR%%"} : ${act_runner_log_dir:="/var/log/act_runner"} : ${act_runner_log_file:="${act_runner_log_dir}/act_runner.log"} -: ${act_runner_flags:="-c ${act_runner_config} daemon"} +: ${act_runner_args:="-c ${act_runner_config} daemon"} -procname="%%PREFIX%%/bin/act_runner" -command="${procname} ${act_runner_flags}" +command="/usr/sbin/daemon" pidfile="/var/run/${name}.pid" +exec_path="%%PREFIX%%/bin/act_runner" -start_cmd="${name}_start" -sig_stop=KILL +required_files=${act_runner_config} -act_runner_start() { +prestart_cmd="${name}_prestart" +sig_stop=TERM + +act_runner_prestart() { # ensure the log directories are owned by the unprivileged user for d in "${act_runner_log_dir}"; do if [ ! -e "$d" ]; then @@ -42,11 +44,12 @@ act_runner_start() { chown "${act_runner_user}" "$d" fi done - /usr/sbin/daemon -S -l "${act_runner_facility}" -s "${act_runner_priority}" \ - -T "${name}" \ - -u "${act_runner_user}" -p "${pidfile}" \ - -o "${act_runner_log_file}" \ - $command } +command_args=" -r -S -l ${act_runner_facility} -s ${act_runner_priority} \ + -T ${name} \ + -u ${act_runner_user} -P ${pidfile} \ + -o ${act_runner_log_file} \ + ${exec_path} ${act_runner_args}" + run_rc_command "$1" |
