summaryrefslogtreecommitdiff
path: root/community/opensmtpd/opensmtpd.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/opensmtpd/opensmtpd.install
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/opensmtpd/opensmtpd.install')
-rw-r--r--community/opensmtpd/opensmtpd.install29
1 files changed, 29 insertions, 0 deletions
diff --git a/community/opensmtpd/opensmtpd.install b/community/opensmtpd/opensmtpd.install
new file mode 100644
index 000000000..48366c15c
--- /dev/null
+++ b/community/opensmtpd/opensmtpd.install
@@ -0,0 +1,29 @@
+# arg 1: the new package version
+post_install() {
+ # create users
+ getent passwd smtpd >/dev/null || useradd -d / -u 91 -g 1 smtpd
+ getent passwd smtpq >/dev/null || useradd -d /var/spool/smtpd -u 92 -g 1 smtpq
+ getent passwd smtpf >/dev/null || useradd -d / -u 93 -g 1 smtpf
+ # initialise aliase db
+ #[[ -e /etc/smtpd/aliases.db ]] || makemap -t aliases /etc/smtpd/aliases
+ true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+ if (( $(vercmp $2 5.3.3p1-1) < 0 )); then
+ echo 'Configuration files have been moved to /etc/smtpd.'
+ echo 'New users have been added.'
+ echo 'Check your configuration!'
+ fi
+}
+
+# arg 1: the old package version
+post_remove() {
+ for _u in smtpd smtpq smtpf; do userdel -f "$_u"; done
+ true
+}
+
+# vim:set ts=2 sw=2 et: