#!/bin/sh # # Add the following lines to /etc/rc.conf to configure eosio_api_healthcheck: # # eosio_api_healthcheck_args : arguments to the command. # # eosio_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="{{ DESCRIPTION }}" logfile="${eosio_api_healthcheck_logfile:-{{ LOG_FILE }}}" pidfile="{{ PID_FILE }}" command="{{ PROGRAM }}" command_args="-p ${pidfile} -l ${logfile} ${eosio_api_healthcheck_args}" start_cmd="${name}_start" eosio_api_healthcheck_start() { echo "Starting ${name}" ${command} ${command_args} 2>&1 & } load_rc_config $name run_rc_command "$1"