1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-16 04:44:55 +02:00
antelope-api-healthcheck/scripts/templates/rc.conf

32 lines
725 B
Bash

#!/bin/sh
#
# Add the following lines to /etc/rc.conf to configure antelope_api_healthcheck:
#
# antelope_api_healthcheck_args : arguments to the command.
#
# antelope_api_healthcheck_logfile : file to log to (default /var/log/${name}.log)
#
# PROVIDE: {{ RC_NAME }}
# REQUIRE: netif FILESYSTEMS
. /etc/rc.subr
name="{{ RC_NAME }}"
desc="{{ PROGRAM_DESCRIPTION }}"
logfile="${antelope_api_healthcheck_logfile:-{{ LOG_FILE }}}"
pidfile="{{ PID_FILE }}"
command="{{ PROGRAM }}"
command_args="-p ${pidfile} -l ${logfile} ${antelope_api_healthcheck_args}"
start_cmd="${name}_start"
antelope_api_healthcheck_start()
{
echo "Starting ${name}"
${command} ${command_args} 2>&1 &
}
load_rc_config $name
run_rc_command "$1"