diff options
Diffstat (limited to 'community/bip/bip.install')
-rw-r--r-- | community/bip/bip.install | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/community/bip/bip.install b/community/bip/bip.install new file mode 100644 index 000000000..5c7857aff --- /dev/null +++ b/community/bip/bip.install @@ -0,0 +1,27 @@ +post_install() { + if ! getent passwd bip > /dev/null; then + echo "==> Creating bip user" + usr/bin/useradd --comment "Bip IRC Proxy" --shell /bin/sh --home /var/lib/bip --system --user-group bip + fi + + mkdir -p /var/run/bip 2 > /dev/null + chown -R bip:bip /var/run/bip + + mkdir -p /var/log/bip 2 > /dev/null + chown -R bip:bip /var/log/bip + systemctl daemon-reload +} + +post_upgrade() { + post_install +} + +pre_remove() { + systemctl stop bip + echo "==> Removing bip user and group" + userdel bip + if getent group bip > /dev/null; then + groupdel bip + fi + rm -rf /var/run/bip +} |