Projects
jsj
jsj-installtools
PreparePostfix
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PreparePostfix of Package jsj-installtools (Revision 23)
Currently displaying revision
23
,
Show latest
#!/bin/bash if [ $# != 1 ]; then echo usage: $0 hostname exit fi if [ -f /etc/SuSE-release ]; then VERSION=$(egrep VERSION /etc/SuSE-release | cut -f2 -d= | tr -d " ") else echo No file /etc/SuSE-release available. Stop. exit 1 fi HOSTNAME=$1 cp /etc/postfix/main.cf /etc/postfix/main.cf.orig POSTCONF=$(mktemp /tmp/main.cf.XXXXXXXXXX) postconf -n | \ sed -e "s/\(myhostname = \).*$/\1$HOSTNAME.jacobs-university.de/" \ -e 's/\(relayhost = \).*$/\1mx.jacobs-university.de/' \ > $POSTCONF mv $POSTCONF /etc/postfix/main.cf ALIASES=$(mktemp /tmp/aliases.XXXXXXXXXX) sed -e '/^#root:/ a root: root@jacobs-university.de' < /etc/aliases > $ALIASES mv /etc/aliases /etc/aliases/orig mv $ALIASES /etc/aliases newaliases if [ ${VERSION%%.*} -ge 12 ]; 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
.