Files
postfix/SNAP/usher
Jay Larson c456a05512 The following changes were made:
* Added patch routine
  * Added patch to disable nis in default config
  * Updated init script to use status_of_proc
  * usher will now restart postfix if running
2018-06-08 09:28:52 -05:00

46 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
set -e
case $1 in
preinst)
exit 0
;;
postinst)
getent group postfix 2>&1 > /dev/null || groupadd -g 32 postfix
getent group postdrop 2>&1 > /dev/null || groupadd -g 33 postdrop
getent passwd postfix 2>&1 > /dev/null || useradd -c "Postfix Daemon" \
-g postfix -d /dev/null -s /bin/false -u 32 postfix
if [ ! -f /etc/aliases ]; then
printf "postmaster: root\nMAILER-DAEMON: root" > /etc/aliases
newaliases
fi
for f in /usr/share/postfix/etc/*; do
if [ ! -f /etc/postfix/`basename $f` ]; then
cp -a $f /etc/postfix
fi
done
chown -R postfix.postdrop /var/spool/postfix/* /var/lib/postfix
chown root.root /var/spool/postfix/pid
chgrp postdrop /usr/sbin/postqueue \
/usr/sbin/postdrop \
/var/spool/postfix/public \
/var/spool/postfix/maildrop
chmod 2555 /usr/sbin/postqueue \
/usr/sbin/postdrop
/etc/init.d/postfix status 2>&1 > /dev/null && /etc/init.d/postfix restart
exit 0
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac