]> andersk Git - moira.git/blame - gen/mailhub.sh
nmailhub service is now mailhub service.
[moira.git] / gen / mailhub.sh
CommitLineData
d0ff1643 1#!/bin/sh
568331c6 2PATH=/bin:/usr/ucb:/usr/bin
bd913bc7 3root=/usr/local/sendmail
f4f32185 4
d0ff1643 5MR_MKCRED=47836474
568331c6 6
bd913bc7 7cat $root/etc/aliases.legacy > $root/etc/aliases.tmp
8cat $root/etc/aliases.new >> $root/etc/aliases.tmp
9cat $root/etc/aliases.local >> $root/etc/aliases.tmp
10mv $root/etc/aliases.tmp $root/etc/aliases.new
48eeb70c 11
bd913bc7 12cp /dev/null $root/etc/aliases.new.db
48eeb70c 13
bd913bc7 14$root/sbin/sendmail -bi -oA$root/etc/aliases.new
d0ff1643 15if [ $? != 0 ]; then
16 exit $MR_MKCRED
bd913bc7 17fi
d0ff1643 18
bd913bc7 19kill `ps -el | grep "sendmail" | egrep -v "grep|mqueue.stall" | awk '{print $4}'`
48eeb70c 20sleep 60
21
bd913bc7 22mv $root/etc/aliases $root/etc/aliases.old
23mv $root/etc/aliases.db $root/etc/aliases.old.db
24mv $root/etc/aliases.new $root/etc/aliases
25mv $root/etc/aliases.new.db $root/etc/aliases.db
48eeb70c 26
27cd /usr/spool/mqueue
28rm -f xf* tf* lf* nf*
29
bd913bc7 30#$root/sbin/sendmail -bd
31#$root/sbin/sendmail -q20m
32
33sh /etc/init.d/sendmail start
d0ff1643 34
568331c6 35rm -f $0
d0ff1643 36exit 0
37
38# $Header$
This page took 0.358856 seconds and 5 git commands to generate.