-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreinstall.sh
More file actions
45 lines (35 loc) · 1021 Bytes
/
reinstall.sh
File metadata and controls
45 lines (35 loc) · 1021 Bytes
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
#!/bin/bash
# Change the reHLDS link below
reHLDS_link="http://(reHLDS Link Place)/reHLDS.zip"
# Define the required files and folders
cstrike="cstrike"
hlds_linux="hlds_linux"
hlds_run="hlds_run"
reHLDS="reHLDS.zip"
# Trying to remove old cs1.6 server files
for file in *; do
if [ "$file" != "reinstall.sh" ]; then
[ -e "$file" ] && rm -r "$file"
fi
done
echo "Removing Old Server files.."
echo "Downloading reHLDS.."
wget -O "$reHLDS" "$reHLDS_link"
unzip -o "$reHLDS"
# Check if server files exist
if [ -d "$cstrike" ] && [ -f "$hlds_linux" ] && [ -f "$hlds_run" ]; then
rm -r "$reHLDS"
echo "Server reinstalled successfully!"
else
if [ -f "$reHLDS" ]; then
echo "Files mising, reconfiguring files.."
unzip -o "$reHLDS"
echo "Server reinstalled successfully!"
else
echo "$reHLDS not found. script cannot complete reinstall."
fi
fi
sleep 1
echo "Script Created By ! A M 1 N E"
echo "Get More at : https://github.com/Amine-Aziz/"
sleep 10