diff options
author | Phillip Smith | 2015-06-02 11:30:21 +1000 |
---|---|---|
committer | Phillip Smith | 2015-06-02 11:30:21 +1000 |
commit | 795cd57225971a37e63842a8e12774097090ec69 (patch) | |
tree | 0a84b5203ac7861ea72abec5c820628a4132bfeb /nsca.install | |
download | aur-795cd57225971a37e63842a8e12774097090ec69.tar.gz |
initial commit
Diffstat (limited to 'nsca.install')
-rw-r--r-- | nsca.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nsca.install b/nsca.install new file mode 100644 index 000000000000..02533b57972a --- /dev/null +++ b/nsca.install @@ -0,0 +1,22 @@ +post_install() { + if [ -z "$(getent group nsca)" ]; then + groupadd -g 32 nsca + fi + if [ -z "$(getent passwd nsca)" ]; then + useradd -u 32 -g nsca -c "Nagios NSCA" -d /dev/null -s /bin/false nsca + fi +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + userdel nsca &> /dev/null + groupdel nsca &> /dev/null +} + +op=$1 +shift + +$op $* |