forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-mini
38 lines (30 loc) · 961 Bytes
/
config-mini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
case $# in
0|1|2|3|4)
echo 'config-mini: usage: config-mini me defaultdom plusdom idhost qmqpserver ...' 1>&2
exit 100
;;
esac
me="$1"; shift
defaultdomain="$1"; shift
plusdomain="$1"; shift
idhost="$1"; shift
echo Putting "$me" into control/me...
echo "$me" > QMAIL/control/me
chmod 644 QMAIL/control/me
echo Putting "$defaultdomain" into control/defaultdomain...
echo "$defaultdomain" > QMAIL/control/defaultdomain
chmod 644 QMAIL/control/defaultdomain
echo Putting "$plusdomain" into control/plusdomain...
echo "$plusdomain" > QMAIL/control/plusdomain
chmod 644 QMAIL/control/plusdomain
echo Putting "$idhost" into control/idhost...
echo "$idhost" > QMAIL/control/idhost
chmod 644 QMAIL/control/idhost
cp /dev/null QMAIL/control/qmqpservers
for qmqpserver in "$@"
do
echo Putting "$qmqpserver" into control/qmqpservers...
echo "$qmqpserver" >> QMAIL/control/qmqpservers
chmod 644 QMAIL/control/qmqpservers
done
exit 0