Automatic server installer for ubuntu servers
#18


im not using your code nor will i ever. it works just fine on ubuntu, so quit the arguing and grow the [CeNsOrEd] up. If you want more of a challenge of linux go install Gentoo Linux and run the LC server off the Gentoo Hardened Kernel source, Good luck

 

 

 

 

 

edit

 

PS: yes it will continue and just keep doing it's thing. But its the fact if you listen to what i say IT WONT ERROR!!

I run Linux as my daily driver so I don't need a kid who can't even write shell scripts properly trying to tell me how to run it. And there is so many places that this can error it's beyond funny.

 

Everyone know's I will walk circles around you in anything that you do. So quit the ego trip as you've proven how credible your "skills" are. You need to stop acting like a leader and step back into your place and learn a thing or two. The only reason you get any kind of love here is because us big boys have moved onto bigger and better things.

 

Here's a slightly more complete snippet. I'll leave it to Pwesty to fix his garbage for you guys. Not once have I released something as half-assed.

#!/bin/bash

printf "\nProper LastChaos EP3 Setup Shell Script By Warmonger\n\n"
sleep 3

##################################################
# Check For Previous Installations
##################################################

if [ -d "lastchaos" ]; then
while true; do
read -p "Previous Files Found, Delete Them? " yn
case $yn in
[Yy]* ) rm -r lastchaos; sleep 1; break;;
[Nn]* ) exit;;
* ) echo "Please Answer Yes Or No";;
esac
done
fi

##################################################
# Create The Directory For Server Files
##################################################

printf "Creating LastChaos Directory..."
mkdir lastchaos >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Navigate Into Directory
##################################################

printf "Navigate Into LastChaos Directory..."
cd lastchaos >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Download Server Files
##################################################

printf "Downloading Server Files..."
wget -t 1 --timeout=10 http://www.lcdownloads.com/garbage/EP3.zip >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Extract Server Files
##################################################

printf "Extracting Server Files..."
unzip EP3.zip >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# CHMOD Server Files
##################################################

printf "CHMOD Connector..."
chmod +x lastchaos/EP3/Connector/Connector >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

printf "CHMOD GameServer..."
chmod +x lastchaos/EP3/GameServer1/GameServer1/GameServer_d >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

printf "CHMOD Helper..."
chmod +x lastchaos/EP3/Helper/Helper/Helper >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

printf "CHMOD LoginServer..."
chmod +x lastchaos/EP3/LoginServer/LoginServer/LoginServer >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

printf "CHMOD Messenger..."
chmod +x lastchaos/EP3/Messenger/Messenger/Messenger >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

printf "CHMOD SubHelper..."
chmod +x lastchaos/EP3/SubHelper/SubHelper >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Install MySQL Server
##################################################

printf "Installing MySQL Server..."
apt-get -y install mysql-server >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Configure MySQL Server
##################################################

printf "Configuring MySQL Server..."
update-rc.d mysql defaults >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Download Databases
##################################################

printf "Downloading Databases..."
wget -t 1 --timeout=10 http://www.lcdownloads.com/garbage/cleandb.zip >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Extract Databases
##################################################

printf "Extracting Databases..."
unzip cleandb.zip >/dev/null 2>&1
if [ "$?" = "0" ]; then
printf " DONE!\n\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi

##################################################
# Create And Restore Databases
##################################################

printf "Creating And Restoring Databases..."
mysql -e "CREATE DATABASE newproject_data;"
if [ "$?" = "0" ]; then
mysql -v newproject_data < clean_newproject_data_ep3.sql
if [ "$?" = "0" ]; then
mysql -e "CREATE DATABASE newproject_db;"
if [ "$?" = "0" ]; then
mysql -v newproject_db < clean_newproject_db_ep3.sql
if [ "$?" = "0" ]; then
mysql -e "CREATE DATABASE newproject_db_auth;"
if [ "$?" = "0" ]; then
mysql -v newproject_db_auth < clean_newproject_db_auth_ep3.sql
if [ "$?" = "0" ]; then
mysql -e "CREATE DATABASE newproject_db_post;"
if [ "$?" = "0" ]; then
mysql -v newproject_db_post < clean_newproject_post_ep3.sql
if [ "$?" = "0" ]; then
mysql -e "CREATE DATABASE newproject_db_user;"
if [ "$?" = "0" ]; then
mysql -v newproject_db_user < clean_newproject_db_user_ep3.sql
if [ "$?" = "0" ]; then
printf " DONE!\n\n"
sleep 1
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi
else
printf " ERROR!\n\n"
exit
fi


Messages In This Thread
[No subject] - by pwesty - 11-26-2014, 01:11 AM
[No subject] - by Kekers - 11-26-2014, 04:08 PM
[No subject] - by bignoob77 - 11-26-2014, 04:32 PM
[No subject] - by Kekers - 11-26-2014, 05:32 PM
[No subject] - by pwesty - 11-26-2014, 06:29 PM
[No subject] - by Kekers - 11-26-2014, 06:55 PM
[No subject] - by jeremie - 11-26-2014, 07:07 PM
[No subject] - by Kekers - 11-26-2014, 07:08 PM
[No subject] - by pwesty - 11-26-2014, 07:30 PM
[No subject] - by Walletman987 - 11-26-2014, 07:36 PM
[No subject] - by Walletman987 - 11-26-2014, 07:40 PM
[No subject] - by Stratos - 11-26-2014, 08:21 PM
[No subject] - by Kekers - 11-26-2014, 08:43 PM
[No subject] - by Dimensions - 11-26-2014, 10:56 PM
[No subject] - by Dimensions - 11-26-2014, 10:56 PM
[No subject] - by ☣ WARFACE ☣ - 11-26-2014, 11:00 PM
[No subject] - by pwesty - 11-27-2014, 01:51 AM
[No subject] - by Kekers - 11-27-2014, 02:49 AM
[No subject] - by pwesty - 11-27-2014, 03:48 AM
[No subject] - by Kekers - 11-27-2014, 04:46 AM
[No subject] - by Kekers - 11-27-2014, 04:35 PM
[No subject] - by pwesty - 11-27-2014, 10:36 PM
[No subject] - by Kekers - 11-28-2014, 01:07 AM
[No subject] - by Walletman987 - 11-28-2014, 04:29 AM
[No subject] - by Arnii - 11-28-2014, 08:15 AM
[No subject] - by Wizatek - 11-28-2014, 09:44 AM
[No subject] - by Kekers - 11-28-2014, 10:17 AM
[No subject] - by Walletman987 - 11-28-2014, 02:17 PM
[No subject] - by Kekers - 11-28-2014, 06:13 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)