summaryrefslogtreecommitdiff
path: root/community-testing/exim/exim.install
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-07-16 05:34:06 +0000
committerroot <root@rshg047.dnsready.net>2011-07-16 05:34:06 +0000
commit7500119d8dd5fc921f91aac8222e472477973740 (patch)
treea2cd26c3dd70d079a9f97fc3d5549ea649baf863 /community-testing/exim/exim.install
parent76c26b027d797f3671bf0b6c6618eda2496cf88d (diff)
Sat Jul 16 05:34:06 UTC 2011
Diffstat (limited to 'community-testing/exim/exim.install')
-rw-r--r--community-testing/exim/exim.install25
1 files changed, 25 insertions, 0 deletions
diff --git a/community-testing/exim/exim.install b/community-testing/exim/exim.install
new file mode 100644
index 000000000..8ed329559
--- /dev/null
+++ b/community-testing/exim/exim.install
@@ -0,0 +1,25 @@
+# arg 1: the new package version
+post_install() {
+ getent group exim >/dev/null 2>&1 || groupadd -g 79 exim
+ if getent passwd exim > /dev/null 2>&1; then
+ usr/sbin/usermod -d /var/spool/exim -c 'Exim MTA' -s /sbin/nologin exim > /dev/null 2>&1
+ else
+ usr/sbin/useradd -c 'Exim MTA' -u 79 -g exim -d /var/spool/exim -s /sbin/nologin exim
+ fi
+ passwd -l exim > /dev/null
+ chown root.exim /var/spool/exim /var/log/exim
+ chown exim.exim /var/spool/exim/db
+ chmod u+s /usr/sbin/exim
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ getent passwd exim >/dev/null 2>&1 && userdel exim
+}
+