From d604c1e8ab404952dbeb632d82ba3e8c41c43b4e Mon Sep 17 00:00:00 2001 From: penguinehis Date: Mon, 24 Nov 2025 22:21:41 -0300 Subject: [PATCH] Fix Install 33 --- install.sh | 15 +++++++++++++++ postinstall.php | 2 +- version.txt | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 09570e2..91af64a 100644 --- a/install.sh +++ b/install.sh @@ -32,6 +32,14 @@ if [ ! -e "/bin/php" ]; then sudo ln -s "$(command -v php)" /bin/php fi +# === BACKUP EXISTING CONFIG.PHP BEFORE REMOVING FOLDER === +CONFIG_BACKUP="/opt/DragonCore_config.php.bak" +if [ -f "/opt/DragonCore/config.php" ]; then + cp /opt/DragonCore/config.php "$CONFIG_BACKUP" + echo "Backup de config.php criado em $CONFIG_BACKUP" +fi +# ========================================================= + cd /opt/ rm -rf DragonCore cd "$HOME" @@ -53,6 +61,13 @@ cd /opt/DragonCore chmod +x * cd "$HOME" + +if [ -f "$CONFIG_BACKUP" ]; then + cp "$CONFIG_BACKUP" /opt/DragonCore/config.php + echo "config.php restaurado de $CONFIG_BACKUP" +fi +# ============================================== + echo -n "/opt/DragonCore/menu" > /bin/menu chmod +x /bin/menu diff --git a/postinstall.php b/postinstall.php index 19dc074..a617ec9 100644 --- a/postinstall.php +++ b/postinstall.php @@ -6,7 +6,7 @@ function installpostgre() $configPath = $dir . '/config.php'; $password = null; - $db_user = 'dragoncore33'; // default user + $db_user = 'dragoncore34'; // default user $db_name = 'dragoncore'; // default db name // If config already exists, load existing password (and user/db if needed) diff --git a/version.txt b/version.txt index e11916c..4ee2c43 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -32 Year Of the Tubular Dragon \ No newline at end of file +33 Year Of the Tubular Dragon \ No newline at end of file