Created
June 24, 2023 13:49
-
-
Save si458/24e8e2f2c7739ef1665d4434ad952106 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# | |
# YOU CAN GET VERSION AND ID FROM https://account.blesta.com/client/plugin/download_manager/client_main/ BY HOVERING OVER THE FILE | |
# SET VALUES BELOW AND RUN SCRIPT AS SUDO | |
VERSION=${1:-"5.5.1"} | |
ID=${2:-"214"} | |
# | |
# DONT CHANGE ANYTHING BELOW | |
# | |
mkdir -p /tmp/blesta-backup | |
date=$(date +'%Y-%m-%d-%H-%M-%S') | |
cp -vrp /var/www/blesta /tmp/blesta-backup/${date} | |
wget https://account.blesta.com/client/plugin/download_manager/client_main/download/${ID}/blesta-${VERSION}.zip -O /tmp/blesta-${VERSION}.zip | |
unzip /tmp/blesta-${VERSION}.zip -d /tmp/blesta-${VERSION} | |
cp -rvp /tmp/blesta-${VERSION}/blesta/ /var/www/ | |
chown -Rv www-data:www-data /var/www/blesta | |
rm -rfv /tmp/blesta-${VERSION} /tmp/blesta-${VERSION}.zip | |
echo "Dont Forget To Visit https://YOURDOMAIN/admin/upgrade" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment