Fix Install 33

This commit is contained in:
2025-11-24 22:21:41 -03:00
parent ad9ece7763
commit d604c1e8ab
3 changed files with 17 additions and 2 deletions

View File

@@ -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