Skip to content

Commit e7992c5

Browse files
committed
Merge branch 'development'
2 parents 061524b + 2bc508a commit e7992c5

File tree

2 files changed

+12
-28
lines changed

2 files changed

+12
-28
lines changed

install.sh

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,33 @@
66
# Website: https://tracker.iguaserver.de
77

88
if whiptail --yesno "Apt Update?" 10 35; then
9-
sudo apt update -y
10-
else
11-
echo "No update"
9+
sudo apt-get update -y
1210
fi
13-
#Check if curl is installed
14-
if ! command -v curl &> /dev/null
11+
#Check if git and mysql are installed
12+
if ! command -v git &> /dev/null
1513
then
16-
sudo apt-get install curl -y
17-
exit
14+
sudo apt-get install git -y
1815
fi
1916
if ! command -v mysql &> /dev/null
2017
then
2118
echo "Please install mysql"
2219
exit 0
2320
fi
24-
webserver=$(whiptail --separate-output --radiolist --title "Installation" "Select your webserver" 10 60 2 \
25-
"Nginx" "Select this if you're running Nginx" ON \
26-
"Apache" "Select this if you're running Apache" OFF 3>&1 1>&2 2>&3)
27-
exitstatus=$?
28-
[[ "$exitstatus" = 1 ]] && exit 0;
29-
#Get Project files
30-
LOCATION=$(curl -s https://api.github.com/repos/AunePVP/Game-Server-Query-and-Control-Center/releases/latest \
31-
| grep "zipball_url" \
32-
| awk '{ print $2 }' \
33-
| sed 's/,$//' \
34-
| sed 's/"//g' ) \
35-
; curl -L -o download.zip $LOCATION
36-
unzip download.zip
37-
rm download.zip
38-
namedir=$(ls -d */)
39-
mkdir ${namedir}query/cron
40-
mkdir ${namedir}query/cron/cache
4121
user=$(whoami)
4222
wsuname=$(whiptail --inputbox --title "Installation" "Please enter your webserver username (most likely www-data)" 10 60 3>&1 1>&2 2>&3)
4323
exitstatus=$?
4424
[[ "$exitstatus" = 1 ]] && exit 0;
45-
#Set file permissions
25+
# Download Source code with git
26+
git clone https://github.com/AunePVP/Game-Server-Query-and-Control-Center
27+
# Set file permissions
28+
namedir=Game-Server-Query-and-Control-Center/
29+
user=$(whoami)
4630
find $namedir -type d -exec chmod 770 {} \;
4731
find $namedir -type f -exec chmod 640 {} \;
4832
find ${namedir}html/type/arkse/ -type f -exec chmod 660 {} \;
4933
sudo chown -R ${user}:${wsuname} $namedir
50-
mv ${namedir}/* .
51-
rm -r $namedir
34+
sudo mv -f ${namedir}{.,}* .
35+
sudo rm -r $namedir
5236

5337
mysqlucheck="$(sudo mysql -sse "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$user')")"
5438
dbname=$(whiptail --inputbox --title "Create Database" "Please enter a name for your database" 10 100 3>&1 1>&2 2>&3)

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.0-alpha
1+
v1.0.1-alpha

0 commit comments

Comments
 (0)