Added dns create entries for a few apps
This commit is contained in:
parent
6f8bf28277
commit
630e383ca9
@ -88,6 +88,9 @@ start_listmonk() {
|
|||||||
# Start service with command to make sure it's up before proceeding
|
# Start service with command to make sure it's up before proceeding
|
||||||
start_service "listmonk" "nc -z 172.99.0.21 9000 &> /dev/null" "8"
|
start_service "listmonk" "nc -z 172.99.0.21 9000 &> /dev/null" "8"
|
||||||
|
|
||||||
|
docker exec pdns pdnsutil add-record $DOMAIN listmonk A 86400 $EXTERNALIP &> /dev/null
|
||||||
|
[ $? -ne 0 ] && fail "Couldn't add dns record"
|
||||||
|
|
||||||
echo -ne "done."
|
echo -ne "done."
|
||||||
}
|
}
|
||||||
email_listmonk() {
|
email_listmonk() {
|
||||||
|
@ -133,6 +133,10 @@ start_matrix() {
|
|||||||
# Set admin user as admin in Matrix
|
# Set admin user as admin in Matrix
|
||||||
docker exec postgresql psql -U matrix -c "update users set admin='1' where name='\"@admin:matrix.$DOMAIN\"'" &> /dev/null
|
docker exec postgresql psql -U matrix -c "update users set admin='1' where name='\"@admin:matrix.$DOMAIN\"'" &> /dev/null
|
||||||
|
|
||||||
|
docker exec pdns pdnsutil add-record $DOMAIN matrix A 86400 $EXTERNALIP &> /dev/null
|
||||||
|
[ $? -ne 0 ] && fail "Couldn't add dns record"
|
||||||
|
|
||||||
|
|
||||||
echo -ne "done."
|
echo -ne "done."
|
||||||
}
|
}
|
||||||
email_matrix() {
|
email_matrix() {
|
||||||
|
@ -77,7 +77,7 @@ curl -X PATCH --data '{"rrsets": [ {"name": "$DOMAIN.", "type": "MX", "ttl": 864
|
|||||||
curl -X PATCH --data '{"rrsets": [ {"name": "$DOMAIN.", "type": "TXT", "ttl": 86400, "changetype": "REPLACE", "records": [ {"content": "\"v=spf1 mx a:$DOMAIN ~all\"", "disabled": false } ] } ] }' -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN.
|
curl -X PATCH --data '{"rrsets": [ {"name": "$DOMAIN.", "type": "TXT", "ttl": 86400, "changetype": "REPLACE", "records": [ {"content": "\"v=spf1 mx a:$DOMAIN ~all\"", "disabled": false } ] } ] }' -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN.
|
||||||
|
|
||||||
# Create the A records for domain
|
# Create the A records for domain
|
||||||
for i in ns1 ns2 pdnsadmin powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation castopod podcasts caddy; do
|
for i in ns1 ns2 pdnsadmin powerdns traefik mail panel nextcloud collabora jitsi element vpn wireguard baserow gitea blog documentation castopod podcasts caddy; do
|
||||||
curl -X PATCH --data "{\"rrsets\": [ {\"name\": \"\$i.$DOMAIN.\", \"type\": \"A\", \"ttl\": 86400, \"changetype\": \"REPLACE\", \"records\": [ {\"content\": \"$EXTERNALIP\", \"disabled\": false } ] } ] }" -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN.
|
curl -X PATCH --data "{\"rrsets\": [ {\"name\": \"\$i.$DOMAIN.\", \"type\": \"A\", \"ttl\": 86400, \"changetype\": \"REPLACE\", \"records\": [ {\"content\": \"$EXTERNALIP\", \"disabled\": false } ] } ] }" -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN.
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -71,5 +71,8 @@ start_vaultwarden() {
|
|||||||
# Start service with command to make sure it's up before proceeding
|
# Start service with command to make sure it's up before proceeding
|
||||||
start_service "vaultwarden" "nc -z 172.99.0.22 80 &> /dev/null" "8"
|
start_service "vaultwarden" "nc -z 172.99.0.22 80 &> /dev/null" "8"
|
||||||
|
|
||||||
|
docker exec pdns pdnsutil add-record $DOMAIN vaultwarden A 86400 $EXTERNALIP &> /dev/null
|
||||||
|
[ $? -ne 0 ] && fail "Couldn't add dns record"
|
||||||
|
|
||||||
echo -ne "done."
|
echo -ne "done."
|
||||||
}
|
}
|
||||||
|
@ -86,9 +86,9 @@ start_wordpress() {
|
|||||||
chmod 740 /federated/apps/wordpress/data/bitnami/wordpress/wp-config.php
|
chmod 740 /federated/apps/wordpress/data/bitnami/wordpress/wp-config.php
|
||||||
|
|
||||||
docker exec pdns pdnsutil add-record $DOMAIN www A 86400 $EXTERNALIP &> /dev/null
|
docker exec pdns pdnsutil add-record $DOMAIN www A 86400 $EXTERNALIP &> /dev/null
|
||||||
[ $? -ne 0 ] && fail "Couldn't add dns record for freescout"
|
[ $? -ne 0 ] && fail "Couldn't add dns record"
|
||||||
docker exec pdns pdnsutil add-record $DOMAIN wordpress A 86400 $EXTERNALIP &> /dev/null
|
docker exec pdns pdnsutil add-record $DOMAIN wordpress A 86400 $EXTERNALIP &> /dev/null
|
||||||
[ $? -ne 0 ] && fail "Couldn't add dns record for freescout"
|
[ $? -ne 0 ] && fail "Couldn't add dns record"
|
||||||
|
|
||||||
echo -ne "done.\n"
|
echo -ne "done.\n"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user