Projects
jsj
jsj-installtools
PreparePostfix
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PreparePostfix of Package jsj-installtools
#!/bin/bash if [ $# -lt 1 ] || [ $# -gt 2 ]; then echo usage: $0 hostname [config] echo config: jsj '(default)' echo hsbhv echo hsb exit fi VAR=$2 if [ $VAR"_" = _ ]; then VAR=jsj fi case $VAR in jsj) DOMAIN=botter.cc; RELAY=router.botter.cc; ROOTMAIL=root@botter.cc;; hsbhv) DOMAIN=hs-bremerhaven.de; RELAY=smtp.hs-bremerhaven.de; ROOTMAIL=sbotter@hs-bremerhaven.de;; hsb) DOMAIN=fbw.hs-bremen.de; RELAY=mail.hs-bremen.de; ROOTMAIL=zfr-fk1@hs-bremen.de;; bb) DOMAIN=srv.bremische-buergerschaft.de; RELAY=router.botter.cc; ROOTMAIL=root@botter.cc;; *) echo Variante $VAR nicht vorgesehen, bitte prüfen!; exit;; esac . /usr/share/jsjinstalltools/GetVersion HOSTNAME=$1 if [ ${VERSION_ID/./} -ge 130 ]; then echo $HOSTNAME".site" > /etc/HOSTNAME fi cp /etc/postfix/main.cf /etc/postfix/main.cf.orig POSTCONF=$(mktemp /tmp/main.cf.XXXXXXXXXX) postconf -n | \ sed -e "s/\(myhostname = \).*$/\1$HOSTNAME.$DOMAIN/" \ -e "s/\(relayhost =\).*$/\1 $RELAY/" \ > $POSTCONF mv $POSTCONF /etc/postfix/main.cf chmod 644 /etc/postfix/main.cf ALIASES=$(mktemp /tmp/aliases.XXXXXXXXXX) sed -e '/^root:/ d' -e "/^#root:/ a root: $ROOTMAIL" < /etc/aliases > $ALIASES mv /etc/aliases /etc/aliases.orig mv $ALIASES /etc/aliases chmod 644 /etc/aliases newaliases if [ ${VERSION_ID/./} -ge 120 ]; then systemctl restart postfix.service systemctl enable postfix.service else rcpostfix restart insserv postfix fi
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.