aboutsummaryrefslogtreecommitdiff
path: root/naemon.install
diff options
context:
space:
mode:
authorJonathan Steel <jsteel@archlinux.org>2015-06-08 18:37:33 +0100
committerJonathan Steel <jsteel@archlinux.org>2015-06-08 18:37:33 +0100
commit403b591f0104d36ebd13eaddf6da2263941b8eae (patch)
treef924d70713ef8ef03283585c9a894445aa7c90af /naemon.install
downloadAUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.gz
AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.zst
AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.zip
Initial commit
Diffstat (limited to 'naemon.install')
-rw-r--r--naemon.install19
1 files changed, 19 insertions, 0 deletions
diff --git a/naemon.install b/naemon.install
new file mode 100644
index 0000000..429505a
--- /dev/null
+++ b/naemon.install
@@ -0,0 +1,19 @@
1pre_install() {
2 getent group naemon &> /dev/null || groupadd -r naemon -g 44
3 getent passwd naemon &> /dev/null || useradd -r -u 44 -g naemon \
4 -d /var/lib/naemon -s /sbin/nologin -c "Naemon" naemon
5}
6
7pre_upgrade() {
8 pre_install
9}
10
11pre_remove() {
12 if [[ -f /run/naemon/naemon.pid ]]; then
13 systemctl stop naemon
14 fi
15}
16
17post_remove() {
18 userdel naemon
19}