updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / sendmail / sendmail.install
blob71f9033a0b175c61748c632083306a2236088120
1 pre_install() {
2     getent group smmsp >/dev/null || /usr/sbin/groupadd -g 25 smmsp
3     getent passwd smmsp >/dev/null || /usr/sbin/useradd -c 'sendmail' -u 150 -g smmsp -d /var/spool/mail -s /bin/false smmsp
4     /usr/bin/passwd -l smmsp &> /dev/null
7 RESTART=/var/run/sendmail.restart
9 pre_upgrade() {
10     if [[ -f /var/run/sendmail.pid ]]; then
11         touch $RESTART
12         /etc/rc.d/sendmail stop || :
13     fi
16 post_upgrade() {
17     if [[ -f $RESTART ]]; then
18         rm $RESTART
19         /etc/rc.d/sendmail start || :
20     fi
23 pre_remove() {
24     /usr/sbin/userdel smmsp &> /dev/null
25     rm -f /etc/mail/aliases.db
26     rmdir --ignore-fail-on-non-empty /var/spool/mqueue