#!/bin/sh
echo " " ;
echo "-  Start/ReStart Server... ... ....Please Wait." ;
echo " " ;
sleep 1 ;
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ;
echo " " ;
sleep 1 ;
echo "- Sending Server TERM-Signals... ... ....." ;
echo " " ;
sleep 1 ;
killall -vwq hltv ;
sleep 1 ;
rm -rf /home/$USER/servers/hlds/hltv.pid ;
echo " " ;
killall -vwq hlds_run;
sleep 1 ;
rm -rf /home/$USER/servers/hlds/startup.pid ;
echo " " ;
killall -vwq hlds_linux ;
sleep 1 ;
rm -rf /home/$USER/servers/hlds/startup.pid ;
echo " " ;
killall -vwq srcds_run ;
sleep 1 ;
rm -rf /home/$USER/servers/srcds/startup.pid ;
echo " " ;
killall -vwq srcds_linux ;
sleep 1 ;
rm -rf /home/$USER/servers/srcds/startup.pid ;
echo " " ;
killall -vwq hltv ;
sleep 1 ;
rm -rf /home/$USER/servers/hlds/startup.pid ;
echo " " ;
sleep 1 ;
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ;
echo " " ;
sleep 1 ;
echo "- Starting Server... ... ....." ;
echo " " ;
sleep 1 ;
cd /home/$USER/servers/srcds
export LD_LIBRARY_PATH="${SRCDS_DIR}:${SRCDS_DIR}/bin:${LD_LIBRARY_PATH}"  
export SteamAppId=730 ;
echo " " ;
sleep 1 ;
./run_go.sh > /dev/null 2>&1 &
echo " " ;
sleep 1 ;
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ;
echo " " ;
sleep 4 ;
echo "     -  Server Start Completed ! ! !" ;
echo " " ;
echo " " ;
echo " " ;
echo " " ;
echo " " ;
echo " " ;