Browse Source

Update Domains

master
Chase 3 weeks ago
parent
commit
4e468c91b6
11 changed files with 18 additions and 19 deletions
  1. 2
      Backup Scripts/DockerCE.sh
  2. 2
      Backup Scripts/MIAB.sh
  3. 2
      Backup Scripts/Pi.sh
  4. 6
      Backup Scripts/WWW.sh
  5. 2
      VM Scripts/Invidious-Update/Update.sh
  6. 2
      VM Scripts/New-LXC/README.md
  7. 4
      VM Scripts/WWW/NewRedirectSite.sh
  8. 2
      VM Scripts/WWW/NewReverseProxy.sh
  9. 2
      VM Scripts/WWW/NewSimpleHTML.sh
  10. 3
      VM Scripts/WWW/NewWPSite.sh
  11. 10
      VM Scripts/WWW/menu.sh

2
Backup Scripts/DockerCE.sh

@ -4,5 +4,5 @@ SyncthingFolder="/home/user/Syncthing"
DATE="$(date +%Y_%m_%d)"
tar -cvpzf /tmp/Docker-Vols-DockerVM.tar.gz /var/lib/docker/volumes/* # Backup all Docker Volumes.
rsync -e 'ssh -i ~/.ssh/id_rsa -p 1003' -avzp /tmp/Docker-Vols-DockerVM.tar.gz user@chasehall.net:$SyncthingFolder/$DATE/Docker-Vols-DockerVM.tar.gz # Transfer to VM.
rsync -e 'ssh -i ~/.ssh/id_rsa -p 1003' -avzp /tmp/Docker-Vols-DockerVM.tar.gz user@chse.xyz:$SyncthingFolder/$DATE/Docker-Vols-DockerVM.tar.gz # Transfer to VM.
rm /tmp/Docker-Vols-DockerVM.tar.gz # Remove Locally.

2
Backup Scripts/MIAB.sh

@ -4,5 +4,5 @@ SyncthingFolder="/home/user/Syncthing"
DATE="$(date +%Y_%m_%d)"
tar -cvpzf /tmp/MIAB.tar.gz /home/user-data/backup/encrypted/* # Backup MIAB.
rsync -e 'ssh -i ~/.ssh/id_rsa_miab -p 1003' -avzp /tmp/MIAB.tar.gz user@chasehall.net:$SyncthingFolder/$DATE/MIAB.tar.gz # Transfer to VM.
rsync -e 'ssh -i ~/.ssh/id_rsa_miab -p 1003' -avzp /tmp/MIAB.tar.gz user@chse.xyz:$SyncthingFolder/$DATE/MIAB.tar.gz # Transfer to VM.
rm /tmp/MIAB.tar.gz # Remove Locally.

2
Backup Scripts/Pi.sh

@ -7,4 +7,4 @@ DATE="$(date +%Y_%m_%d)"
mv $SrcFolder/* $DestFolder/ # I don't trust syncthing since you can delete the source from the VMs
find $DestFolder/* -mtime +5 -exec rm -r {} \; # Removes Backups older than 5d. [https://stackoverflow.com/a/31389766]
ssh -p1003 user@chasehall.net 'rm -r /home/user/Syncthing/*' # Empty Syncthing so another sync won't trigger.
ssh -p1003 user@chse.xyz 'rm -r /home/user/Syncthing/*' # Empty Syncthing so another sync won't trigger.

6
Backup Scripts/WWW.sh

@ -5,11 +5,11 @@ DATE="$(date +%Y_%m_%d)"
MySQLPW=""
mysqldump --all-databases --single-transaction --quick --lock-tables=false > /tmp/sql-dump.sql -u root -p$MySQLPW # Dump Entire DB into /tmp/.
rsync -e 'ssh -p 1003' -avzp /tmp/sql-dump.sql user@chasehall.net:$SyncthingFolder/$DATE/WWW-SQL-Dump.sql # Transfer to VM.
rsync -e 'ssh -p 1003' -avzp /tmp/sql-dump.sql user@chse.xyz:$SyncthingFolder/$DATE/WWW-SQL-Dump.sql # Transfer to VM.
rm /tmp/sql-dump.sql # Remove Locally.
tar -cvpzf /tmp/WWW.tar.gz /var/www/* # Backup /var/www/.
rsync -e 'ssh -p 1003' -avzp /tmp/WWW.tar.gz user@chasehall.net:$SyncthingFolder/$DATE/WWW.tar.gz # Transfer to VM.
rsync -e 'ssh -p 1003' -avzp /tmp/WWW.tar.gz user@chse.xyz:$SyncthingFolder/$DATE/WWW.tar.gz # Transfer to VM.
rm /tmp/WWW.tar.gz # Remove Locally.
rsync -e 'ssh -p 1003' -avzp /etc/apache2/sites-available/www.conf user@chasehall.net:$SyncthingFolder/$DATE/Apache2-www-conf.conf # Transfer to VM.
rsync -e 'ssh -p 1003' -avzp /etc/apache2/sites-available/www.conf user@chse.xyz:$SyncthingFolder/$DATE/Apache2-www-conf.conf # Transfer to VM.

2
VM Scripts/Invidious-Update/Update.sh

@ -1,6 +1,6 @@
#!/bin/bash
# Modified from: https://git.chasehall.net/Chase/Invidious-Updater
# Modified from: https://git.chse.xyz/Chase/Invidious-Updater
# This is NOT an installation script, please see above for that.

2
VM Scripts/New-LXC/README.md

@ -1,3 +1,3 @@
Running this script.
`sudo apt update && sudo apt install wget -y && sudo wget https://git.chasehall.net/Chase/Scripts/raw/branch/master/VM%20Scripts/New-LXC/setup.sh && sudo chmod +x setup.sh && bash setup.sh && rm setup.sh`
`sudo apt update && sudo apt install wget -y && sudo wget https://git.chse.xyz/Chase/Scripts/raw/branch/master/VM%20Scripts/New-LXC/setup.sh && sudo chmod +x setup.sh && bash setup.sh && rm setup.sh`

4
VM Scripts/WWW/NewRedirectSite.sh

@ -13,7 +13,7 @@ if [ "$(whoami)" != 'root' ]; then
echo "You have to execute this script as root user"
exit 1;
fi
read -p "Where should $ServerName_URL go to? (new.chasehall.net) [We assume HTTPS.]" newvar
read -p "Where should $ServerName_URL go to? (dest.chse.xyz) [We assume HTTPS.] " newvar
echo "$MIAB_curl $MIAB_Email:$MIAB_Password $MIAB_Link/$ServerName_URL" >> /root/ddns.sh
echo "sleep 1" >> /root/ddns.sh
$MIAB_curl $MIAB_Email:$MIAB_Password $MIAB_Link/$ServerName_URL
@ -31,7 +31,7 @@ Redirect permanent / https://$ServerName_URL/
# HTTPS
<VirtualHost *:443>
ServerAdmin ch@chasehall.net
ServerAdmin c@chse.xyz
ServerName $ServerName_URL
Redirect permanent / https://$newvar/
#Include /etc/letsencrypt/options-ssl-apache.conf

2
VM Scripts/WWW/NewReverseProxy.sh

@ -34,7 +34,7 @@ Redirect permanent / https://$ServerName_URL/
# HTTPS
<VirtualHost *:443>
ServerAdmin ch@chasehall.net
ServerAdmin c@chse.xyz
ServerName $ServerName_URL
ProxyPreserveHost On
ProxyPass /.well-known !

2
VM Scripts/WWW/NewSimpleHTML.sh

@ -32,7 +32,7 @@ Redirect permanent / https://$ServerName_URL/
# HTTPS
<VirtualHost *:443>
ServerAdmin ch@chasehall.net
ServerAdmin c@chse.xyz
ServerName $ServerName_URL
DocumentRoot /var/www/$ServerName_URL
#Include /etc/letsencrypt/options-ssl-apache.conf

3
VM Scripts/WWW/NewWPSite.sh

@ -42,7 +42,7 @@ Redirect permanent / https://$ServerName_URL/
# HTTPS
<VirtualHost *:443>
ServerAdmin $MIAB_Email
ServerAdmin c@chse.xyz
ServerName $ServerName_URL
DocumentRoot /var/www/$ServerName_URL
#Include /etc/letsencrypt/options-ssl-apache.conf
@ -96,7 +96,6 @@ wp plugin install adminimize --activate --allow-root
wp plugin install capability-manager-enhanced --activate --allow-root
wp plugin install host-webfonts-local --activate --allow-root
wp plugin install hcaptcha-for-forms-and-more --activate --allow-root
wp plugin install https://git.chasehall.net/NebulaHost/WordPress/raw/branch/master/NebulaHost-ClientThings/NebulaHost-ClientThings.zip --allow-root
chown -R www-data:www-data /var/www/$ServerName_URL/
#chmod 444 /var/www/$ServerName_URL/wp-config.php
#chmod 444 /var/www/$ServerName_URL/.htaccess

10
VM Scripts/WWW/menu.sh

@ -27,20 +27,20 @@ $HEIGHT $WIDTH $CHOICE_HEIGHT \
clear
case $CHOICE in
1)
read -p 'New WP Site Domain (i.e. c1000.nebulahost.us): ' uservar
read -p 'New WP Site Domain (i.e. wp.chse.xyz): ' uservar
bash NewWPSite.sh $uservar
;;
2)
read -p 'New Reverse Proxy Domain (i.e. service.chasehall.net): ' uservar
read -p 'What is getting reverse proxyd (i.e. 192.168.86.1:1111) [We assume http://]' uservar2
read -p 'New Reverse Proxy Domain (i.e. service.chse.xyz): ' uservar
read -p 'What is getting reverse proxyd (i.e. 192.168.86.1:1111) [We assume http://] ' uservar2
bash NewReverseProxy.sh $uservar $uservar2
;;
3)
read -p 'New HTTP Site Domain (i.e. simple.cmh.pw): ' uservar
read -p 'New HTTP Site Domain (i.e. http.chse.xyz): ' uservar
bash NewSimpleHTML.sh $uservar
;;
4)
read -p 'Site you want the redirect to be (i.e. redirect.cmh.pw): ' uservar
read -p 'Where are we coming from? (i.e. source.chse.xyz): ' uservar
bash NewRedirectSite.sh $uservar
;;
esac
Loading…
Cancel
Save