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