Added re-directs where they need to be
This commit is contained in:
parent
c87124df39
commit
b5e2d82aff
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Federated installation script
|
# Federated installation script
|
||||||
|
|
||||||
@ -69,7 +69,9 @@ get_config() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ADMINPASS=$(create_password);
|
ADMINPASS=$(create_password);
|
||||||
|
echo "$ADMINPASS" > /federated/bin/.adminpass
|
||||||
LISTMONKPASS=$(create_password);
|
LISTMONKPASS=$(create_password);
|
||||||
|
echo "$LISTMONKPASS" >> /federated/bin/.adminpass
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts d OPTION; do
|
while getopts d OPTION; do
|
||||||
|
@ -210,7 +210,7 @@ https://documentation.federated.computer/users.
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Send out e-mail from mail container with details
|
# Send out e-mail from mail container with details
|
||||||
docker exec -it mail bash -c "mail -r admin@$DOMAIN -s \"Welcome to Federated\" admin@$DOMAIN, derek@federated.computer < /root/certs/mailfile"
|
docker exec -it mail bash -c "mail -r admin@$DOMAIN -s \"Welcome to Federated\" admin@$DOMAIN < /root/certs/mailfile"
|
||||||
cat /federated/apps/mail/data/root/certs/mailfile
|
cat /federated/apps/mail/data/root/certs/mailfile
|
||||||
rm /federated/apps/mail/data/root/certs/mailfile
|
rm /federated/apps/mail/data/root/certs/mailfile
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, rej
|
|||||||
smtpd_sender_login_maps = ldap:/etc/postfix/ldap-aliases.cf
|
smtpd_sender_login_maps = ldap:/etc/postfix/ldap-aliases.cf
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat /federated/apps/mail/data/tmp/docker-mailserver/fail2ban-jail.cf <<'EOF'
|
cat > /federated/apps/mail/data/tmp/docker-mailserver/fail2ban-jail.cf <<'EOF'
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
|
||||||
# "bantime" is the number of seconds that a host is banned.
|
# "bantime" is the number of seconds that a host is banned.
|
||||||
@ -163,7 +163,7 @@ start_mail() {
|
|||||||
# Insert the DKIM DNS TXT entry into /federated/apps/pdns container
|
# Insert the DKIM DNS TXT entry into /federated/apps/pdns container
|
||||||
DKIM_RECORD_STRIP=`cat /federated/apps/mail/data/tmp/docker-mailserver/opendkim/keys/$DOMAIN/mail.txt | sed 's/.*(//'`
|
DKIM_RECORD_STRIP=`cat /federated/apps/mail/data/tmp/docker-mailserver/opendkim/keys/$DOMAIN/mail.txt | sed 's/.*(//'`
|
||||||
DKIM_RECORD=`echo $DKIM_RECORD_STRIP | sed 's/).*//'`
|
DKIM_RECORD=`echo $DKIM_RECORD_STRIP | sed 's/).*//'`
|
||||||
docker exec -it pdns pdnsutil add-record $DOMAIN mail._domainkey TXT 86400 "$DKIM_RECORD"
|
docker exec -it pdns pdnsutil add-record $DOMAIN mail._domainkey TXT 86400 "$DKIM_RECORD" &> /dev/null
|
||||||
[ $? -ne 0 ] && fail "Couldn't insert DKIM record into /federated/apps/pdns container"
|
[ $? -ne 0 ] && fail "Couldn't insert DKIM record into /federated/apps/pdns container"
|
||||||
|
|
||||||
# Insert the DMARC DNS TXT entry into /federated/apps/dns container
|
# Insert the DMARC DNS TXT entry into /federated/apps/dns container
|
||||||
|
@ -104,7 +104,7 @@ start_pdns() {
|
|||||||
start_service "pdns" "nc -z ${SERVICE_IP} 8081 &> /dev/null"
|
start_service "pdns" "nc -z ${SERVICE_IP} 8081 &> /dev/null"
|
||||||
|
|
||||||
# Run createrecords.sh inside baserow container
|
# Run createrecords.sh inside baserow container
|
||||||
docker exec -it pdns /root/createrecords.sh
|
docker exec -it pdns /root/createrecords.sh &> /dev/null
|
||||||
[ $? -ne 0 ] && fail "Couldn't run createrecords.sh in /federated/apps/pdns container"
|
[ $? -ne 0 ] && fail "Couldn't run createrecords.sh in /federated/apps/pdns container"
|
||||||
|
|
||||||
kill -9 $SPINPID &> /dev/null
|
kill -9 $SPINPID &> /dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user