mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-03 11:53:43 +02:00
freebsd: tell newsyslog where the pid file is.
This commit is contained in:
parent
9e8ee93983
commit
184302b9e4
3 changed files with 7 additions and 2 deletions
|
|
@ -5,6 +5,9 @@ PACKAGE_TMPDIR="${PACKAGE_TMPDIR}/freebsd"
|
||||||
PACKAGE_RCDIR=/etc/rc.d
|
PACKAGE_RCDIR=/etc/rc.d
|
||||||
PACKAGE_NEWSYSLOGDIR=etc/newsyslog.conf.d
|
PACKAGE_NEWSYSLOGDIR=etc/newsyslog.conf.d
|
||||||
|
|
||||||
|
# Common variables
|
||||||
|
PID_FILE=/var/run/${PACKAGE_NAME}.pid
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Create rc file #
|
# Create rc file #
|
||||||
############################
|
############################
|
||||||
|
|
@ -15,6 +18,7 @@ RC_NAME=$(echo ${PACKAGE_NAME} | sed "s~-~_~g")
|
||||||
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_RCDIR}
|
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_RCDIR}
|
||||||
cat ${TEMPLATE_DIR}/rc.conf \
|
cat ${TEMPLATE_DIR}/rc.conf \
|
||||||
| sed "s~{{ RC_NAME }}~${RC_NAME}~g" \
|
| sed "s~{{ RC_NAME }}~${RC_NAME}~g" \
|
||||||
|
| sed "s~{{ PID_FILE }}~${PID_FILE}~g" \
|
||||||
| sed "s~{{ DESCRIPTION }}~${PACKAGE_DESCRIPTION}~" \
|
| sed "s~{{ DESCRIPTION }}~${PACKAGE_DESCRIPTION}~" \
|
||||||
| sed "s~{{ PROGRAM }}~/${PACKAGE_BINDIR}/${PACKAGE_NAME}~" \
|
| sed "s~{{ PROGRAM }}~/${PACKAGE_BINDIR}/${PACKAGE_NAME}~" \
|
||||||
> ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_RCDIR}/${RC_NAME}
|
> ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_RCDIR}/${RC_NAME}
|
||||||
|
|
@ -29,6 +33,7 @@ chmod 755 ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_RCDIR}/${RC_NAME}
|
||||||
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_NEWSYSLOGDIR}
|
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_NEWSYSLOGDIR}
|
||||||
cat ${TEMPLATE_DIR}/newsyslog.conf \
|
cat ${TEMPLATE_DIR}/newsyslog.conf \
|
||||||
| sed "s~{{ LOG_FILE }}~${PACKAGE_LOGFILE}~" \
|
| sed "s~{{ LOG_FILE }}~${PACKAGE_LOGFILE}~" \
|
||||||
|
| sed "s~{{ PID_FILE }}~${PID_FILE}~g" \
|
||||||
> ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_NEWSYSLOGDIR}/${PACKAGE_NAME}.conf
|
> ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_NEWSYSLOGDIR}/${PACKAGE_NAME}.conf
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
||||||
{{ LOG_FILE }} 640 3 * @T10 JC
|
{{ LOG_FILE }} 640 3 * @T10 JC {{ PID_FILE }}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
name="{{ RC_NAME }}"
|
name="{{ RC_NAME }}"
|
||||||
desc="{{ DESCRIPTION }}"
|
desc="{{ DESCRIPTION }}"
|
||||||
logfile="${eosio_api_healthcheck_logfile:-/var/log/${name}.log}"
|
logfile="${eosio_api_healthcheck_logfile:-/var/log/${name}.log}"
|
||||||
pidfile="/var/run/${name}.pid"
|
pidfile="{{ PID_FILE }}"
|
||||||
command="{{ PROGRAM }}"
|
command="{{ PROGRAM }}"
|
||||||
command_args="-p ${pidfile} ${eosio_api_healthcheck_args}"
|
command_args="-p ${pidfile} ${eosio_api_healthcheck_args}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue