mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +00:00
Add update server before initializing | Fix var assignation issue
This commit is contained in:
13
index.sh
13
index.sh
@@ -10,11 +10,18 @@ fi
|
||||
|
||||
cd "$TARGET_DIR" || exit 1
|
||||
|
||||
echo "Running install.sh from the cloned repository..."
|
||||
echo "[ INITIALIZER ]: Starting initialization"
|
||||
echo "[ INITIALIZER ]: Updating server"
|
||||
sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y
|
||||
|
||||
echo "[ INITIALIZER ]: Server updated. Starting set up"
|
||||
|
||||
chmod +x ./install.sh
|
||||
./install.sh "$1"
|
||||
|
||||
echo "Cleaning up..."
|
||||
echo "[ INITIALIZER ]: Setup completed succesfully!"
|
||||
|
||||
echo "[ INITIALIZER ]: Cleaning up"
|
||||
cd /
|
||||
rm -rf "$TARGET_DIR"
|
||||
echo "Cleanup complete!"
|
||||
echo "[ INITIALIZER ]: Success!"
|
||||
|
||||
Reference in New Issue
Block a user