aboutsummaryrefslogtreecommitdiff
path: root/naemon.install
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-14 12:59:12 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-14 13:38:11 +0100
commita4b20506c21eeead57d134bdf6ac77cd23e1664a (patch)
treed75247e3f6d35092c880ea259204c3656c78e7e3 /naemon.install
parent746bfc7e2fd0c246b880b529d02af264a1744e1d (diff)
downloadAUR-a4b20506c21eeead57d134bdf6ac77cd23e1664a.tar.gz
AUR-a4b20506c21eeead57d134bdf6ac77cd23e1664a.tar.zst
AUR-a4b20506c21eeead57d134bdf6ac77cd23e1664a.zip
Update to 1.0.9
Diffstat (limited to 'naemon.install')
-rw-r--r--naemon.install16
1 files changed, 11 insertions, 5 deletions
diff --git a/naemon.install b/naemon.install
index d5b5b5f..c32c848 100644
--- a/naemon.install
+++ b/naemon.install
@@ -1,15 +1,21 @@
1pre_install() { 1post_install() {
2 getent group naemon &> /dev/null || groupadd -r naemon -g 44 2 getent group naemon &> /dev/null || groupadd -r naemon -g 44
3 getent passwd naemon &> /dev/null || useradd -r -u 44 -g naemon \ 3 getent passwd naemon &> /dev/null || useradd -r -u 44 -g naemon \
4 -d /var/lib/naemon -s /sbin/nologin -c "Naemon" naemon 4 -d /var/lib/naemon -s /usr/bin/false -c "Naemon" naemon
5}
6 5
7pre_upgrade() { 6 chown naemon:naemon /var/lib/naemon
8 pre_install 7 chown -R naemon:naemon /etc/naemon
8 /usr/bin/systemd-tmpfiles --create naemon.conf
9} 9}
10 10
11pre_remove() { 11pre_remove() {
12 if [[ -f /run/naemon/naemon.pid ]]; then 12 if [[ -f /run/naemon/naemon.pid ]]; then
13 systemctl stop naemon 13 systemctl stop naemon
14 fi 14 fi
15 /usr/bin/systemd-tmpfiles --remove naemon.conf
16
17 userdel naemon &> /dev/null
18 groupdel naemon &> /dev/null
19
20 rm -rf /var/lib/naemon
15} 21}