Raised This Month: $32 Target: $400
 8% 

Servers Control Panel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkEvil
AlliedModders Donor
Join Date: May 2013
Location: 127.0.0.1@root
Old 01-24-2015 , 13:35   Servers Control Panel
Reply With Quote #1

Removed

Last edited by DarkEvil; 01-01-2017 at 13:03.
DarkEvil is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-24-2015 , 17:28   Re: Servers Control Panel
Reply With Quote #2

why would you need to restart VPS for that purpose?


<scriptname> start/stop/restart/status
PHP Code:
# replace <newuser> with the user you want to run the server as (NOT ROOT)
SRCDS_USER="<newuser>"
# Do not change this path
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# The path to the game you want to host. Replace <filepath> with your path, example = /home/newuser/tf2/orangebox
DIR=<filepath>
DAEMON=$DIR/srcds_run
# Change all PARAMS to your needs.
PARAMS="-console -game tf +map ctf_2fort -maxplayers 30 -autoupdate"
# Change <name> to what you want the detached screen to be called. e.g. SRCDS-TF2
NAME=<name>
DESC="Source Dedicated Server"
case "$1" in
start
)
echo 
"Starting $DESC$NAME"
if [ -e $DIR ];
then
  cd $DIR
su $SRCDS_USER 
--"screen -d -m -S $NAME $DAEMON $PARAMS"
else echo "No such directory: $DIR!"
fi
;;
stop)
if 
su $SRCDS_USER --"screen -ls |grep $NAME"
then
     
echo -"Stopping $DESC$NAME"
     
su $SRCDS_USER --"screen -S $NAME  -X quit "
    
echo " ... done."
else
    echo 
"Couldn't find a running $DESC"
fi
;;
restart)
if 
su $SRCDS_USER --"screen -ls |grep $NAME"
then
     
echo -"Stopping $DESC$NAME"
     
su $SRCDS_USER --"screen -S $NAME  -X quit "
     
echo " ... done."
else
     echo 
"Couldn't find a running $DESC"
fi
echo -"Starting $DESC$NAME"
cd $DIR
su $SRCDS_USER 
--"screen -d -m -S $NAME $DAEMON $PARAMS"
echo " ... done."
;;
status)
# Check whether there's a "srcds" process
ps aux grep -v grep grep srcds_r > /dev/null
CHECK
=$?
$CHECK -eq 0 ] && echo "SRCDS is UP" || echo "SRCDS is DOWN"
;;
*)
echo 
"Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
exit 

Last edited by LambdaLambda; 01-24-2015 at 17:29.
LambdaLambda is offline
DarkEvil
AlliedModders Donor
Join Date: May 2013
Location: 127.0.0.1@root
Old 01-27-2015 , 10:14   Re: Servers Control Panel
Reply With Quote #3

Any more replies?
DarkEvil is offline
The1Speck
SourceMod Donor
Join Date: Oct 2014
Location: USA
Old 01-27-2015 , 12:12   Re: Servers Control Panel
Reply With Quote #4

http://www.webhostingtalk.com/showthread.php?t=1043075
__________________

Add me on Steam for personal inquiries or direct assistance.
The1Speck is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode