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
|
sudo ln -s "$(command -v php)" /bin/php
|
||||||
fi
|
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/
|
cd /opt/
|
||||||
rm -rf DragonCore
|
rm -rf DragonCore
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
@@ -53,6 +61,13 @@ cd /opt/DragonCore
|
|||||||
chmod +x *
|
chmod +x *
|
||||||
cd "$HOME"
|
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
|
echo -n "/opt/DragonCore/menu" > /bin/menu
|
||||||
chmod +x /bin/menu
|
chmod +x /bin/menu
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ function installpostgre()
|
|||||||
$configPath = $dir . '/config.php';
|
$configPath = $dir . '/config.php';
|
||||||
|
|
||||||
$password = null;
|
$password = null;
|
||||||
$db_user = 'dragoncore33'; // default user
|
$db_user = 'dragoncore34'; // default user
|
||||||
$db_name = 'dragoncore'; // default db name
|
$db_name = 'dragoncore'; // default db name
|
||||||
|
|
||||||
// If config already exists, load existing password (and user/db if needed)
|
// If config already exists, load existing password (and user/db if needed)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
32 Year Of the Tubular Dragon
|
33 Year Of the Tubular Dragon
|
||||||
Reference in New Issue
Block a user