Update UPDATE.sh

This commit is contained in:
Stefan Pejcic 2024-08-19 13:52:41 +02:00 committed by GitHub
parent d07d916cc4
commit 53ce6e23ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -363,10 +363,10 @@ run_custom_postupdate_script() {
create_backup_first(){
echo ""
echo "Creating a backup of /etc/openpanel/ to /tmp/OPENPANEL024"
echo "Please use this command to restore if update fails: rm -rf /etc/openpanel && cp -r /tmp/OPENPANEL024 /etc/openpanel && cp /etc/openpanel/docker/compose/docker-compose.yml /root/docker-compose.yml && cd /root && docker compose up -d"
mkdir -p /tmp/OPENPANEL024/
cp -r /etc/openpanel /tmp/OPENPANEL024
echo "Creating a backup of /etc/openpanel/ to /tmp/OPENPANEL_BEFORE_UPDATE_024"
echo "Please use this command to restore if update fails: rm -rf /etc/openpanel && cp -r /tmp/OPENPANEL_BEFORE_UPDATE_024 /etc/openpanel && cp /etc/openpanel/docker/compose/docker-compose.yml /root/docker-compose.yml && cd /root && docker compose up -d"
mkdir -p /tmp/OPENPANEL_BEFORE_UPDATE_024/
cp -r /etc/openpanel /tmp/OPENPANEL_BEFORE_UPDATE_024
}
@ -513,6 +513,8 @@ update_config_files() {
mv "$TEMP_DIR_FOR_GIT"/* . 2>/dev/null
fi
cp /tmp/OPENPANEL024/openadmin/users.db /etc/openpanel/openadmin/users.db
# Clean up temporary files
rm -rf "$TEMP_DIR_FOR_GIT"