summaryrefslogtreecommitdiff
path: root/libre/bitlbee-libre/bitlbee.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-11-29 20:34:52 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-11-29 20:34:52 -0200
commitaa2b2d4b2cc268803b3bbcbf19566d22b0fe01ea (patch)
tree4f42b3e619abfccef0d8645021cde5ccaafa9ce8 /libre/bitlbee-libre/bitlbee.install
parentb25ef9d1259ce9d8d01b6c5a8acde6abec497d41 (diff)
downloadabslibre-aa2b2d4b2cc268803b3bbcbf19566d22b0fe01ea.tar.gz
abslibre-aa2b2d4b2cc268803b3bbcbf19566d22b0fe01ea.tar.bz2
abslibre-aa2b2d4b2cc268803b3bbcbf19566d22b0fe01ea.zip
bitlbee-libre-3.2.1-1: updating version
Diffstat (limited to 'libre/bitlbee-libre/bitlbee.install')
-rw-r--r--libre/bitlbee-libre/bitlbee.install21
1 files changed, 14 insertions, 7 deletions
diff --git a/libre/bitlbee-libre/bitlbee.install b/libre/bitlbee-libre/bitlbee.install
index aa5a81a70..c8a8f93a1 100644
--- a/libre/bitlbee-libre/bitlbee.install
+++ b/libre/bitlbee-libre/bitlbee.install
@@ -1,15 +1,22 @@
post_install() {
- getent group bitlbee &>/dev/null || groupadd -r -g 65 bitlbee >/dev/null
- getent passwd bitlbee &>/dev/null || useradd -r -u 65 -g bitlbee -d /var/lib/bitlbee -s /bin/false -c bitlbee bitlbee >/dev/null
- systemd-tmpfiles --create bitlbee.conf
+ if ! getent group bitlbee &>/dev/null; then
+ groupadd -r -g 65 bitlbee >/dev/null
+ fi
+ if ! getent passwd bitlbee &>/dev/null; then
+ useradd -r -u 65 -g bitlbee -d /var/lib/bitlbee -s /bin/false -c bitlbee bitlbee >/dev/null
+ fi
+ systemd-tmpfiles --create bitlbee.conf
}
post_upgrade() {
- post_install
+ post_install
}
post_remove() {
- getent passwd bitlbee &>/dev/null && userdel bitlbee >/dev/null
- getent group bitlbee &>/dev/null && groupdel bitlbee >/dev/null
- true
+ if getent passwd bitlbee &>/dev/null; then
+ userdel bitlbee >/dev/null
+ fi
+ if getent group bitlbee &>/dev/null; then
+ groupdel bitlbee >/dev/null
+ fi
}