set conf permissions correctly; change log location

This commit is contained in:
sceox 2021-11-15 00:30:21 -08:00
parent be2a7f4048
commit 5f96921697
3 changed files with 6 additions and 6 deletions

View File

@ -3,6 +3,8 @@
PREFIX = /usr/local
NAGIOS_DIR = ${PREFIX}/nagios
NAGIOS_EXEC = ${NAGIOS_DIR}/libexec
NAGIOS_USER = _nagios
NAGIOS_GROUP = ${NAGIOS_USER}
SYSTEMD_UNIT_DIR = /lib/systemd/system
rc: install
@ -29,7 +31,9 @@ install:
@chmod 755 ${NAGIOS_EXEC}/check_onion
@echo installing ircbot.sh to ${PREFIX}/bin
@cp -f ircbot.sh ${PREFIX}/bin
test -f /etc/ircbot.conf || install -m 640 ircbot.conf.default /etc/ircbot.conf
@echo installing ircbot.conf to /etc
test -f /etc/ircbot.conf || install -m 640 -o root -g ${NAGIOS_GROUP} ircbot.conf.default /etc/ircbot.conf
test -f /var/log/ircbot.log || install -m 640 -o ${NAGIOS_USER} -g wheel /dev/null /var/log/ircbot.log
@chmod 755 ${PREFIX}/bin/ircbot.sh
uninstall:

View File

@ -59,7 +59,3 @@ systemd or rc. Start it with `systemctl start ircbot` or `rcctl start ircbot`.
The nagios IRC bot (ircbot.sh) does not automatically rejoin the
IRC server and channel after it loses the connection.
The Makefile does not install the /etc/ircbot.conf configuration
file with the correct ownership and permissions. It should be
readable by nagios user on Linux and _nagios user on OpenBSD.

View File

@ -6,5 +6,5 @@ password='mysecretpass'
port='6667'
inputf=/tmp/ircinput
msgf=/tmp/ircmsg
logf=/tmp/notify_irc.log
logf=/var/log/ircbot.log
joinmsg="nagios bot reporting"