From a4b20506c21eeead57d134bdf6ac77cd23e1664a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 14 Feb 2019 12:59:12 +0100 Subject: Update to 1.0.9 --- naemon.install | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'naemon.install') diff --git a/naemon.install b/naemon.install index d5b5b5f..c32c848 100644 --- a/naemon.install +++ b/naemon.install @@ -1,15 +1,21 @@ -pre_install() { +post_install() { getent group naemon &> /dev/null || groupadd -r naemon -g 44 getent passwd naemon &> /dev/null || useradd -r -u 44 -g naemon \ - -d /var/lib/naemon -s /sbin/nologin -c "Naemon" naemon -} + -d /var/lib/naemon -s /usr/bin/false -c "Naemon" naemon -pre_upgrade() { - pre_install + chown naemon:naemon /var/lib/naemon + chown -R naemon:naemon /etc/naemon + /usr/bin/systemd-tmpfiles --create naemon.conf } pre_remove() { if [[ -f /run/naemon/naemon.pid ]]; then systemctl stop naemon fi + /usr/bin/systemd-tmpfiles --remove naemon.conf + + userdel naemon &> /dev/null + groupdel naemon &> /dev/null + + rm -rf /var/lib/naemon } -- cgit v1.2.3