config-mini 961 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. case $# in
  2. 0|1|2|3|4)
  3. echo 'config-mini: usage: config-mini me defaultdom plusdom idhost qmqpserver ...' 1>&2
  4. exit 100
  5. ;;
  6. esac
  7. me="$1"; shift
  8. defaultdomain="$1"; shift
  9. plusdomain="$1"; shift
  10. idhost="$1"; shift
  11. echo Putting "$me" into control/me...
  12. echo "$me" > QMAIL/control/me
  13. chmod 644 QMAIL/control/me
  14. echo Putting "$defaultdomain" into control/defaultdomain...
  15. echo "$defaultdomain" > QMAIL/control/defaultdomain
  16. chmod 644 QMAIL/control/defaultdomain
  17. echo Putting "$plusdomain" into control/plusdomain...
  18. echo "$plusdomain" > QMAIL/control/plusdomain
  19. chmod 644 QMAIL/control/plusdomain
  20. echo Putting "$idhost" into control/idhost...
  21. echo "$idhost" > QMAIL/control/idhost
  22. chmod 644 QMAIL/control/idhost
  23. cp /dev/null QMAIL/control/qmqpservers
  24. for qmqpserver in "$@"
  25. do
  26. echo Putting "$qmqpserver" into control/qmqpservers...
  27. echo "$qmqpserver" >> QMAIL/control/qmqpservers
  28. chmod 644 QMAIL/control/qmqpservers
  29. done
  30. exit 0