From 3738f298a5b8f51462b61f29d0f39c7aa0395e84 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 31 Jul 2023 17:28:47 +0000 Subject: [PATCH] Wordpress round 3 --- bin/convertdomain | 22 +++++++++++++++++++++- lib/castopod.sh | 1 + lib/functions.sh | 14 ++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/bin/convertdomain b/bin/convertdomain index 4ef3384..f23e015 100755 --- a/bin/convertdomain +++ b/bin/convertdomain @@ -35,7 +35,7 @@ do_serviceprep() { docker exec -it pdns pdnsutil set-kind $DOMAIN_NEW native docker exec -it 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; 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; do docker exec -it pdns pdnsutil add-record $DOMAIN_NEW $i A 86400 $EXTERNALIP done @@ -746,6 +746,25 @@ convert_caddy() { echo -ne "done." } +convert_castopod() { + #### Convert Castopod + echo -ne "\n* Converting castopod.." + + sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/castopod/docker-compose.yml + sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/castopod/.env + + # Grab the container IP from docker-compose + SERVICE_IP=`grep ipv4_address /federated/apps/castopod/docker-compose.yml | awk '{ print $2 }'` + + # Start service with command to make sure it's up before proceeding + start_service_convert "castopod" "nc -z $SERVICE_IP 8000 &> /dev/null" + + MYSQL_ROOTPASSWORD=`cat /federated/apps/pdnsmysql/.env | grep MYSQL_ROOT_PASSWORD | awk -F= '{ print $2 }'` + docker exec pdnsmysql bash -c "mysql -uroot -p$MYSQL_ROOTPASSWORD -e \"update cp_auth_identities set secret='admin@$DOMAIN_NEW' where id='1';\"" + docker exec pdnsmysql bash -c "mysql -uroot -p$MYSQL_ROOTPASSWORD -e \"update cp_users set username='admin@$DOMAIN_NEW' where id='1';\"" + + echo -ne "done." +} usage() { echo "$0: " exit 2 @@ -799,3 +818,4 @@ convert_jitsi convert_baserow convert_gitea convert_caddy +convert_castopod diff --git a/lib/castopod.sh b/lib/castopod.sh index cb63643..7fb6185 100644 --- a/lib/castopod.sh +++ b/lib/castopod.sh @@ -11,6 +11,7 @@ config_castopod() { if [ ! -d "/federated/apps/castopod" ]; then mkdir -p /federated/apps/castopod/data/var/www/castopod/public/media + chown -R 33 /federated/apps/castopod/data/var fi cat > /federated/apps/castopod/docker-compose.yml < Password: as given above

+

Castopod: https://castopod.$DOMAIN/cp-auth/login

+Castopod provides you with a full platform for hosting and delivering podcasts to your audience. The user +authentication is limited to the "admin" account. The user name is "admin@$DOMAIN" and the admin password given above. + +User administration is done in Castopod, but you set up users using the admin user created above. +

+

Wordpress: https://www.$DOMAIN/login

+Wordpress provides a dynamic content-management-solution used by 10s of millions of websites around the globe. Federated +has included it as one of the two (and default) solutions for hosting your domain's website. +Simply go to https://wordpress.domain.com/wp-login.php and enter the admin name and password for access to Wordpress for your domain. +

+User name: admin@$DOMAIN +Password: password as given above +

Thanks for your support!

Thank you for your support of Federated Computer. We really appreciate it and hope you have a very successful