diff --git a/version/0.3.5/UPDATE.sh b/version/0.3.5/UPDATE.sh index 8a1f4bec..0db8de05 100644 --- a/version/0.3.5/UPDATE.sh +++ b/version/0.3.5/UPDATE.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Update from OpenPanel 0.3.3 to 0.3.4 +# Update from OpenPanel 0.3.4 to 0.3.5 # new version NEW_PANEL_VERSION="0.3.5" @@ -38,7 +38,7 @@ update_blocker() { exit 1 } -update_blocker +#update_blocker echo "Starting update.." @@ -77,6 +77,9 @@ FUNCTIONS=( #notify user we started print_header + # 0.3.5 only! + instert_sessions + # update docker openpanel image download_new_panel @@ -253,6 +256,51 @@ download_new_admin() { + +instert_sessions() { + + +# SQL query to check if the table exists +TABLE_EXISTS=$(mysql -e "USE panel; SHOW TABLES LIKE 'active_sessions';" | grep "active_sessions") + +# Check if the table exists +if [ -z "$TABLE_EXISTS" ]; then + echo "Table 'active_sessions' does not exist. Creating table..." + + # Create the active_sessions table + mysql <