databases/influxdb: Improve syslog logging title

This changes the log entries from "daemon[PID]: logmesage" to
"influxd[PID]: logmessage". While here, remove trailing spaces.

Approved by:		0mp (mentor)
Pull Request:		https://github.com/freebsd/freebsd-ports/pull/121
Differential Revision:	https://reviews.freebsd.org/D33907
This commit is contained in:
Jeremy Chadwick
2022-01-16 10:37:06 +01:00
committed by Dries Michiels
parent d7e0acbd4d
commit dc765dc71a
2 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
PORTNAME= influxdb
DISTVERSIONPREFIX= v
DISTVERSION= 1.8.10
PORTREVISION= 1
CATEGORIES= databases net-mgmt
MAINTAINER= driesm@FreeBSD.org

View File

@@ -43,7 +43,7 @@ influxd_pidfile="%%INFLUXD_PIDDIR%%${name}.pid"
procname="%%PREFIX%%/bin/${name}"
command=/usr/sbin/daemon
start_precmd="influxd_precmd"
start_cmd="influxd_startcmd_%%INFLUXD_LOGCMD%%"
start_cmd="influxd_startcmd_%%INFLUXD_LOGCMD%%"
influxd_precmd()
{
@@ -52,16 +52,16 @@ influxd_precmd()
influxd_startcmd_daemon()
{
echo "Starting ${name}."
/usr/sbin/daemon -c -p ${influxd_pidfile} -S -s ${influxd_priority} -l ${influxd_facility} \
-u ${influxd_user} ${procname} ${influxd_options}
echo "Starting ${name}."
/usr/sbin/daemon -c -p ${influxd_pidfile} -S -s ${influxd_priority} -l ${influxd_facility} -T ${name} \
-u ${influxd_user} ${procname} ${influxd_options}
}
influxd_startcmd_logger()
influxd_startcmd_logger()
{
echo "Starting ${name}."
echo "Starting ${name}."
/usr/sbin/daemon -c -p ${influxd_pidfile} -u ${influxd_user} /bin/sh -c "${procname} ${influxd_options} 2>&1 \
| /usr/bin/logger -t ${name} -p ${influxd_facility}.${influxd_priority}"
}
}
run_rc_command "$1"