Fixed SMTPUSER in convertdomain and matrix admin user setting in postgresql
This commit is contained in:
parent
9f9eecb689
commit
14c9d5c5fd
@ -35,7 +35,7 @@ do_serviceprep() {
|
||||
docker exec pdns pdnsutil set-kind $DOMAIN_NEW native
|
||||
docker exec pdns pdnsutil set-meta $DOMAIN_NEW SOA-EDIT-API DEFAULT
|
||||
|
||||
for i in ns1 ns2 powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation podcasts castopod caddy wordpress bookstack freescout; do
|
||||
for i in ns1 ns2 powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation podcasts castopod caddy wordpress bookstack freescout msp; do
|
||||
docker exec pdns pdnsutil add-record $DOMAIN_NEW $i A 86400 $EXTERNALIP
|
||||
done
|
||||
|
||||
@ -46,6 +46,9 @@ do_serviceprep() {
|
||||
docker exec pdns pdnsutil add-record $DOMAIN_NEW \* CNAME 86400 www.$DOMAIN_NEW
|
||||
docker exec pdns pdnsutil add-record $DOMAIN_NEW @ A 86400 $EXTERNALIP
|
||||
|
||||
# Set SMTP user based on if fcore exists
|
||||
[[ $(docker exec ldap slapcat | grep fcore) ]] && SMTPUSER="fcore" || SMTPUSER="admin"
|
||||
|
||||
# Other pre-prep service stuff
|
||||
docker exec -u 33 nextcloud /var/www/html/occ -vv ldap:delete-config s01
|
||||
docker exec -u 33 nextcloud /var/www/html/occ app:disable user_ldap
|
||||
@ -59,9 +62,6 @@ do_serviceprep() {
|
||||
sed -i "s#dc=federatedcomputer,dc=cloud#dc=$DOMAIN_FIRST,dc=$DOMAIN_LAST#g" /federated/apps/ldap/data/root/convertdomain1.ldif
|
||||
fi
|
||||
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/ldap/data/root/convertdomain1.ldif
|
||||
|
||||
# Set SMTP user based on if fcore exists
|
||||
[[ $(docker exec -it ldap slapcat | grep fcore) ]] && SMTPUSER="fcore" || SMTPUSER="admin"
|
||||
}
|
||||
convert_pdnsmysql() {
|
||||
#### Convert PowerDNS pdnsmysql
|
||||
@ -597,6 +597,9 @@ EOF
|
||||
# Start service with command to make sure it's up before proceeding
|
||||
start_service_convert "matrix" "nc -z $SERVICE_IP 8008 &> /dev/null"
|
||||
|
||||
# Set admin user as admin in Matrix
|
||||
docker exec postgresql psql -U matrix -c "update users set admin='1' where name='\"@admin:matrix.$DOMAIN_NEW\"'" &> /dev/null
|
||||
|
||||
echo -ne "done."
|
||||
}
|
||||
convert_element() {
|
||||
|
@ -114,6 +114,9 @@ start_matrix() {
|
||||
# Start service with command to make sure it's up before proceeding
|
||||
start_service "matrix" "nc -z 172.99.0.19 8008 &> /dev/null" "8"
|
||||
|
||||
# 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
|
||||
|
||||
kill -9 $SPINPID &> /dev/null
|
||||
echo -ne "done."
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user