Created
March 20, 2021 21:09
-
-
Save 9ete/5868dd1fefc3b52dc3b09fccfdc58f10 to your computer and use it in GitHub Desktop.
LM Debian Server Updates 7 - 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printf "\n\n Pre Update Work \n\n"; | |
printf "Remove Mod Pagespeed"; | |
# disable the working symlinked stuffs | |
a2dismod pagespeed; | |
service apache2 restart; | |
# turn off | |
mv /etc/apache2/mods-available/pagespeed.conf /etc/apache2/mods-available/pagespeed.conf.on | |
mv /etc/apache2/mods-available/pagespeed.conf.off /etc/apache2/mods-available/pagespeed.conf | |
# remove cloudflare apache module | |
mv /etc/apache2/mods-available/cloudflare.load /etc/apache2/mods-available/cloudflare.load.bak; | |
mv /etc/apache2/mods-enabled/cloudflare.load /etc/apache2/mods-enabled/cloudflare.load.bak; | |
# edit to off from on and save | |
service apache2 restart; | |
# will work for the most | |
apt-get autoremove mod-pagespeed-stable -y; | |
# will work for some | |
apt-get autoremove mod-pagespeed-beta -y; | |
# must restart Apache | |
service apache2 restart; | |
rm -fr /var/cache/mod_pagespeed; | |
# check the path, restart apache2 | |
service apache2 restart; | |
# fix dl google gpg key | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -; | |
# force update of expired version | |
apt-get -o Acquire::Check-Valid-Until=false update -y; | |
printf "\n\n RUNNING UPDATE - latest wheezy updates from archive \n\n"; | |
printf "\n apt-get update"; | |
apt-get update -y; | |
printf "\n apt-get upgrade"; | |
apt-get upgrade -y; | |
printf "\n apt-get dist-upgrade"; | |
apt-get dist-upgrade -y; | |
printf "\n\n\n"; | |
cat /etc/*-release; | |
printf "\n\n\n"; | |
printf "RUNNING UPDATE - to jessie \n\n"; | |
rm sources.list; | |
mv sources.list.jessie sources.list; | |
printf "\n apt-get update"; | |
apt-get update -y; | |
printf "\n apt-get upgrade"; | |
apt-get upgrade -y; | |
printf "\n apt-get dist-upgrade"; | |
apt-get dist-upgrade -y; | |
printf "\n\n\n"; | |
cat /etc/*-release; | |
cp /etc/apache2/apache2.conf /etc/apache2.conf.wheezy; | |
cp /etc/apache2/apache2.conf.jessie /etc/apache2/apache2.conf; | |
cp /var/www/index.html /var/www/html/index.html; | |
service apache2 restart; | |
apt-get update -qy && apt-get upgrade -qy && apt-get dist-upgrade -qy; cat /etc/*-release; | |
mv sources.list sources.list.jessie; | |
mv sources.list.stretch sources.list; | |
apt-get update -qy && apt-get upgrade -qy && apt-get dist-upgrade -qy; cat /etc/*-release; | |
mv sources.list sources.list.stretch; | |
mv sources.list.buster sources.list; | |
apt-get update -qy && apt-get upgrade -qy && apt-get dist-upgrade -qa; cat /etc/*-release; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment