Update doc install : use sudo

This commit is contained in:
Benjamin Renard 2021-02-23 12:34:08 +01:00
parent e29767a369
commit 44fa842761

View file

@ -13,7 +13,9 @@ apt install lmdb-utils
git clone https://gogs.zionetrix.net/bn8/check_mdb.git /usr/local/src/check_mdb
mkdir -p /usr/local/lib/nagios/plugins
ln -s /usr/local/src/check_mdb/check_mdb /usr/local/lib/nagios/plugins/
echo "command[check_mdb]=/usr/local/lib/nagios/plugins/check_mdb" > /etc/nagios/nrpe.d/ldap-mdb.cfg
echo "nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_mdb" > /etc/sudoers.d/nagios-slapd-mdb
chmod 0400 /etc/sudoers.d/nagios-slapd-mdb
echo "command[check_mdb]=sudo /usr/local/lib/nagios/plugins/check_mdb" > /etc/nagios/nrpe.d/ldap-mdb.cfg
service nagios-nrpe-server reload
```