set conf permissions correctly; change log location
This commit is contained in:
parent
be2a7f4048
commit
5f96921697
6
Makefile
6
Makefile
@ -3,6 +3,8 @@
|
|||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
NAGIOS_DIR = ${PREFIX}/nagios
|
NAGIOS_DIR = ${PREFIX}/nagios
|
||||||
NAGIOS_EXEC = ${NAGIOS_DIR}/libexec
|
NAGIOS_EXEC = ${NAGIOS_DIR}/libexec
|
||||||
|
NAGIOS_USER = _nagios
|
||||||
|
NAGIOS_GROUP = ${NAGIOS_USER}
|
||||||
SYSTEMD_UNIT_DIR = /lib/systemd/system
|
SYSTEMD_UNIT_DIR = /lib/systemd/system
|
||||||
|
|
||||||
rc: install
|
rc: install
|
||||||
@ -29,7 +31,9 @@ install:
|
|||||||
@chmod 755 ${NAGIOS_EXEC}/check_onion
|
@chmod 755 ${NAGIOS_EXEC}/check_onion
|
||||||
@echo installing ircbot.sh to ${PREFIX}/bin
|
@echo installing ircbot.sh to ${PREFIX}/bin
|
||||||
@cp -f ircbot.sh ${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
|
@chmod 755 ${PREFIX}/bin/ircbot.sh
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
@ -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
|
The nagios IRC bot (ircbot.sh) does not automatically rejoin the
|
||||||
IRC server and channel after it loses the connection.
|
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.
|
|
||||||
|
@ -6,5 +6,5 @@ password='mysecretpass'
|
|||||||
port='6667'
|
port='6667'
|
||||||
inputf=/tmp/ircinput
|
inputf=/tmp/ircinput
|
||||||
msgf=/tmp/ircmsg
|
msgf=/tmp/ircmsg
|
||||||
logf=/tmp/notify_irc.log
|
logf=/var/log/ircbot.log
|
||||||
joinmsg="nagios bot reporting"
|
joinmsg="nagios bot reporting"
|
||||||
|
Reference in New Issue
Block a user