From 5b368b25055bfb617f117208d72ba22f9364d57b Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Mon, 19 Aug 2024 13:38:49 +0200 Subject: [PATCH] Update UPDATE.sh --- version/0.2.5/UPDATE.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/version/0.2.5/UPDATE.sh b/version/0.2.5/UPDATE.sh index 51472d4c..59ea6100 100644 --- a/version/0.2.5/UPDATE.sh +++ b/version/0.2.5/UPDATE.sh @@ -86,6 +86,10 @@ FUNCTIONS=( #notify user we started print_header + #backup /etc/openpanel/ first + create_backup_first + + # fix for bug with php not autostarting php_fix @@ -110,6 +114,10 @@ FUNCTIONS=( # start bind bind_also + # setup mail server + set_mailserver + + # ping us verify_license @@ -353,6 +361,15 @@ 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 +} + + set_mailserver(){ opencli email-server install }