forked from lordofwizard/mcserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall
More file actions
executable file
·37 lines (27 loc) · 718 Bytes
/
uninstall
File metadata and controls
executable file
·37 lines (27 loc) · 718 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
#!/bin/bash
export MAIN_DIR=$PWD
echo "> Checking..."
# Begin Uninstalling Server
if [ ! -d $MAIN_DIR/server ]; then
echo "> You haven't installed the server yet..."
elif [ -d $MAIN_DIR/server ]; then
echo "> Server Folder Detected!"
echo " -- Are you sure you want to uninstall and delete your server? --"
echo "Type [1] for Yes"
echo "Type [2] for No"
UninstallPick=1
read UninstallPick
if [[ -z $UninstallPick ]]; then
echo "> By Default, you selected 'No'"
echo "> Abort!"
elif [[ $UninstallPick == 1 ]]; then
sudo rm -r server
sudo rm -rf bin
killall screen
echo "> Uninstall Complete! To make a new server, do ./install"
elif [[ $UninstallPick == 2 ]]; then
echo "> Abort!"
else
echo "> Abort!"
fi
fi