-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install.sh
106 lines (97 loc) · 2.34 KB
/
Install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/bash
DIR="$(cd "$(dirname "$0")" && pwd)"
source $DIR/config.sh
clear
sleep 1
echo "Getting AMAP Ready.."
sleep 1
clear
echo "Getting AMAP Ready..."
sleep 1
clear
echo "Getting AMAP Ready...."
sleep 1
clear
echo "This project is still in the works any issues please report on Github."
sleep 3
echo "NOW STARTING....."
sleep 2
echo "Making files Executable"
sleep 2
files=(
"$DIR/$FILELOC/RustServerInstall.sh"
"$DIR/$FILELOC/Fullwipe.sh"
"$DIR/$FILELOC/Mapwipe.sh"
"$DIR/$FILELOC/LogCleaner.sh"
"$DIR/$FILELOC/Nightly.sh"
"$DIR/$FILELOC/Schedule.sh"
"$DIR/$FILELOC/ServerBackups.sh"
"$DIR/$FILELOC/ServerChecker.sh"
"$DIR/$FILELOC/ServerStart.sh"
"$DIR/$FILELOC/wipeconfigure.sh"
"$DIR/$FILEMAIN/AMAP.sh"
"$DIR/$FILEMAIN/AMAPNC.sh"
"$DIR/$FILELOC/PluginsMove.sh"
"$DIR/$FILELOC/ServerConfigurator.sh"
"$DIR/$FILELOC/RMPlugins.sh"
"$DIR/$FILELOC/Updater.sh"
)
total_files=${#files[@]}
current_file=1
for file in "${files[@]}"; do
echo "Progress: [$((current_file * 100 / total_files))%]"
chmod +x "$file"
((current_file++))
done
echo "Files are now Executable"
sleep 2
chmod +x Scripts/checkuser
echo "Getting Systems Username for Config file...."
sleep 2
$USER
echo "Username Updated" || echo "Failed to get Username edit file manually"
sleep 2
echo "Moving AMAP files"
mv AMAP ..//
echo "Move Completed" || echo "Failed"
echo "Checking for RSYNC installation"
sleep 2
if ! command -v rsync &> /dev/null
then
echo "RSYNC is not installed, installing now..."
sudo apt-get update
sudo apt-get install rsync -y
echo "Installation of RSYNC Completed" || { echo "RSYNC Failed to install"; exit 1; }
else
echo "RSYNC is already installed"
fi
# D2s Fav editor ;D
echo "Checking for nano text editor"
sleep 2
if ! command -v nano &> /dev/null
then
echo "Nano is not installed, installing now..."
sudo apt-get update
sudo apt-get install nano -y
echo "Nano Editor Installed" || { echo "NANO Failed to install"; exit 1; }
else
echo "Nano is already installed"
fi
sleep 2
echo "Getting Packages Ready..."
sleep 2
chmod +x Scripts/PackageInstaller.sh
sleep 2
$PACKINSTALL &&
clear
echo "Installation is now completed. Starting AMAP"
sleep 2
clear
echo "Edit Config File Before Starting AMAP"
echo "Press ENTER to continue"
read -r
cd ..//
rm -fr NoobsOnTheRunPublic
cd AMAP
nano config.sh
./AMAP.sh