Files containing an '~' or '.' are ignored by sudo when placed in the includedir /etc/sudoers.d This makes the file useless. The file is renamed to "zabbix" instead of "zabbix.user" to fix this.
See: https://www.sudo.ws/man/1.8.13/sudoers.man.html#Including_other_files_from_within_sudoers
Signed-off-by: Alexander Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
-/etc/sudoers.d/zabbix.user
+/etc/sudoers.d/zabbix
/etc/zabbix_agentd/*
etc/logrotate.d/zabbix_agentd
etc/rc.d/init.d/zabbix_agentd
-etc/sudoers.d/zabbix.user
+etc/sudoers.d/zabbix
etc/zabbix_agentd
etc/zabbix_agentd/scripts
etc/zabbix_agentd/zabbix_agentd.conf
# Install sudoers include file
install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/sudoers \
- /etc/sudoers.d/zabbix.user
+ /etc/sudoers.d/zabbix
# Install include file for backup
install -v -m 644 $(DIR_SRC)/config/backup/includes/zabbix_agentd \
. /opt/pakfire/lib/functions.sh
./uninstall.sh
./install.sh
+
+# Ensure /etc/sudoers.d/zabbix.user is renamed to /etc/sudoers.d/zabbix
+if [ -e /etc/sudoers.d/zabbix.user ]; then
+ mv -v /etc/sudoers.d/zabbix.user /etc/sudoers.d/zabbix
+fi