fix some bugs
This commit is contained in:
@@ -9,19 +9,18 @@ if [[ ! -d /state/envdir ]]; then
|
||||
chown mastodon:mastodon /state/envdir
|
||||
fi
|
||||
|
||||
if [[ ! -e /state/envdir/WEB_DOMAIN ]]; then
|
||||
if [[ -n "$WEB_DOMAIN" ]]; then
|
||||
echo "$WEB_DOMAIN" > /state/envdir/WEB_DOMAIN
|
||||
else
|
||||
hostname --fqdn > /state/envdir/WEB_DOMAIN
|
||||
fi
|
||||
chown mastodon:mastodon /state/envdir/*
|
||||
if [[ -z "$WEB_DOMAIN" ]]; then
|
||||
WEB_DOMAIN="$(hostname --fqdn)"
|
||||
fi
|
||||
|
||||
cat /etc/postfix/main.cf | grep -v '^myhostname' > /etc/postfix/main.new
|
||||
if [[ -e /state/envdir/WEB_DOMAIN ]]; then
|
||||
WEB_DOMAIN="$(cat /state/envdir/WEB_DOMAIN)"
|
||||
fi
|
||||
|
||||
cat /etc/postfix/main.cf | grep -v '^myhostname' | grep -v '^myorigin' > /etc/postfix/main.new
|
||||
rm /etc/postfix/main.cf
|
||||
echo "myhostname = $(cat /state/envdir/WEB_DOMAIN)" >> /etc/postfix/main.cf
|
||||
echo "myorigin = $(cat /state/envdir/WEB_DOMAIN)" >> /etc/postfix/main.cf
|
||||
echo "myhostname = $WEB_DOMAIN" >> /etc/postfix/main.cf
|
||||
echo "myorigin = $WEB_DOMAIN" >> /etc/postfix/main.cf
|
||||
cat /etc/postfix/main.new >> /etc/postfix/main.cf
|
||||
rm /etc/postfix/main.new
|
||||
|
||||
|
||||
Reference in New Issue
Block a user