diff options
author | Jonathan Steel <jsteel@archlinux.org> | 2015-06-08 18:37:33 +0100 |
---|---|---|
committer | Jonathan Steel <jsteel@archlinux.org> | 2015-06-08 18:37:33 +0100 |
commit | 403b591f0104d36ebd13eaddf6da2263941b8eae (patch) | |
tree | f924d70713ef8ef03283585c9a894445aa7c90af /naemon.install | |
download | AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.gz AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.zst AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.zip |
Initial commit
Diffstat (limited to 'naemon.install')
-rw-r--r-- | naemon.install | 19 |
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 @@ | |||
1 | pre_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 | |||
7 | pre_upgrade() { | ||
8 | pre_install | ||
9 | } | ||
10 | |||
11 | pre_remove() { | ||
12 | if [[ -f /run/naemon/naemon.pid ]]; then | ||
13 | systemctl stop naemon | ||
14 | fi | ||
15 | } | ||
16 | |||
17 | post_remove() { | ||
18 | userdel naemon | ||
19 | } | ||