Fix Install 33
This commit is contained in:
15
install.sh
15
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user