Skip to content

Commit

Permalink
net-mgmt/alertmanager: Fix logging
Browse files Browse the repository at this point in the history
Redirect stdout and stderr of the Alertmanager to its log file with
the daemon(8) -o flag instead of shell redirections. The reason for
this change is that shell redirections simply do not work in this case.

While here, remove an unnecessary env(1) invocation.

Approved by:	portmgr blanket (runtime fix)
Fixes:		df292e7
MFH:		2022Q1
Sponsored by:	Ekco
Sponsored by:	Klara Inc
  • Loading branch information
0mp committed Mar 3, 2022
1 parent fc969cf commit 2ae66e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions net-mgmt/alertmanager/Makefile
Expand Up @@ -3,6 +3,7 @@
PORTNAME= alertmanager
PORTVERSION= 0.23.0
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= net-mgmt

MAINTAINER= michal@hanu.la
Expand Down
4 changes: 2 additions & 2 deletions net-mgmt/alertmanager/files/alertmanager.in
Expand Up @@ -43,10 +43,10 @@ command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/alertmanager"
sig_reload=HUP
extra_commands="reload"
command_args="-p ${pidfile} /usr/bin/env ${procname} \
command_args="-o ${alertmanager_log_file} -p ${pidfile} ${procname} \
--config.file=${alertmanager_config} \
--storage.path=${alertmanager_data_dir} \
${alertmanager_args} > ${alertmanager_log_file} 2>&1"
${alertmanager_args}"

start_precmd=alertmanager_startprecmd

Expand Down

0 comments on commit 2ae66e8

Please sign in to comment.