Techie
Messing around with installing…
by Logan Rogers-Follis on Jan.30, 2010, under Techie
Messing around with installing openSUSE 11.2 on my old Dell Workstation
Launch of my new Self Help section!
by Logan Rogers-Follis on Oct.30, 2009, under Techie
I have launched a Self Help section which provides a list of applications and scripts that I have compiled over the years. These applications/scripts are being listed to help people looking for solutions to keep their computers running smoothly and/or to clean off adware, malware, spyware, virus, etc.
Fixed an auto-create issue with Xen Domains (DomU’s)
by Logan Rogers-Follis on Jun.06, 2009, under Techie
To get my Xen domains to auto-create with via service I have created my own /etc/init.d/xendomains Run-level Startup script. It will still not auto-create on boot up (after a halt/reboot) but at least I can start the files in /etc/xen/auto/ via “service xendomains start” now. This issue of not auto-creating the Xen domains is not an issue with this script, but rather my server I still need to debug. I did “mv /etc/init.d/xendomains /etc/init.d/xendomains.old.script” to backup the old script for later use, then I created a new /etc/init.d/xendomains file with the following script in it:
Custom xendomains Run-level Startup script:
#!/bin/bash
#
# Run-level Startup script for starting Xen domains
#
# chkconfig: 345 99 00
# Description: Starts and stops Xen domains# Created to fix Xen auto-start issue on my CentOS 5.3 / Xen 3.0.3 Server
# Created by Logan Rogers-Follis on 06-06-2009# Depending on parameter — startup, shutdown, restart, reload
# of the instance and listener or usage displayxen_auto=”/etc/xen/auto/”
lock_file=”/var/lock/subsys/xendomains”
sleep_time=40# If the folder does not exist or is empty — display error
if [ ! -d $xen_auto ]
then
echo “Missing $xen_auto folder: cannot start”
exit 1
elif [ ! “$(ls -A $xen_auto)” ]
then
echo “No files in $xen_auto: cannot start”
exit 1
ficase “$1” in
start)
# Check for lock_file & Create Xen domains
if [ -f $lock_file ]
then
echo “Xen domains are already running!”
else
echo “Create Xen domains:”
for u in $(ls $xen_auto*)
do
xm create $u
done
touch $lock_file
echo “Xen domains created!”
fi
;;
stop)
# Check for lock_file & Shutdown Xen domains
if [ ! -f $lock_file ]
then
echo “Xen domains are not running!”
else
echo -n “Shutdown Xen domains: ”
cd $xen_auto
for z in $(ls *)
do
xm shutdown $z
done
rm -f $lock_file
echo “OK”
fi
;;
reload|restart)
$0 stop
echo “Sleeping for $sleep_time second while the Xen domains finish their shutdown!”
sleep $sleep_time
$0 start
;;
*)
echo “Usage: $0 start|stop|restart|reload”
exit 1
esac
exit 0
Linux Service scripts for TF2 and L4D
by Logan Rogers-Follis on Jun.06, 2009, under Techie
While I was working on the Unreal Tournament 3 (UT3) server I found a great post on the Epic Games Forum by Kzoink that had a Liunux Service script for UT3. I have adjusted it to correctly terminate both the srcds_run an srcds_i486. Below are copies of the them I am now using on my TF2 and L4D servers. I am using his original script for my upcoming UT3 server.
NOTE: For these scripts to work correctly you’ll need to ensure you have a file called startserver.sh in the tf2/l4d_home path that has “chmod +x” permissions. The startserver.sh file will contain your startup command line for the game. Please see one of the game server configs or Linux Service scripts at my Articles section for examples of the startserver.sh files you can use.
Team Fortress 2 (TF2) Linux Service script (please change tf2_home & tf2_ownr accordingly):
#!/bin/bash
#
# Run-level Startup script for srcds_run
#
# chkconfig: 345 91 19
# description: Starts and stops hlds dedicated server binarytf2_home=”/home/teamfortress2/hlds/orangebox/”
tf2_ownr=”teamfortress2″# if the executables do not exist — display error
if [ ! -f $tf2_home/startserver.sh -o ! -d $tf2_home ]
then
echo “HLDS TF2 Server: cannot start”
exit 1
fi# depending on parameter — startup, shutdown, restart
# of the instance and listener or usage displaycase “$1” in
start)
# HLDS TF2 basic start script or command can be called here. For my purposes I placed the entire command line a shell script called startserver.sh
echo -n “Starting HLDS TF2 Server: ”
su – $tf2_ownr -c “cd $tf2_home && ./startserver.sh &”
touch /var/lock/subsys/teamfortress
echo “OK”
;;
stop)
# TF2 kill-shutdown
echo -n “Shutdown HLDS TF2 Server: ”
su – $tf2_ownr -c “killall srcds_run”
su – $tf2_ownr -c “killall srcds_i486”
rm -f /var/lock/subsys/teamfortress
echo “OK”
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo “Usage: $0 start|stop|restart|reload”
exit 1
esac
exit 0
Left 4 Dead (L4D) Linux Service script (please change l4d_home & l4d_ownr accordingly):
#!/bin/bash
#
# Run-level Startup script for srcds_run
#
# chkconfig: 345 91 19
# description: Starts and stops hlds dedicated server binaryl4d_home=”/home/left4dead/hlds/l4d/”
l4d_ownr=”left4dead”# if the executables do not exist — display error
if [ ! -f $l4d_home/startserver.sh -o ! -d $l4d_home ]
then
echo “HLDS L4D Server: cannot start”
exit 1
fi# depending on parameter — startup, shutdown, restart
# of the instance and listener or usage displaycase “$1” in
start)
# HLDS L4D basic start script or command can be called here. For my purposes I placed the entire command line a shell script called startserver.sh
echo -n “Starting HLDS L4D Server: ”
su – $l4d_ownr -c “cd $l4d_home && ./startserver.sh &”
touch /var/lock/subsys/left4dead
echo “OK”
;;
stop)
# L4D kill-shutdown
echo -n “Shutdown HLDS L4D Server: ”
su – $l4d_ownr -c “killall srcds_run”
su – $l4d_ownr -c “killall srcds_i486”
rm -f /var/lock/subsys/left4dead
echo “OK”
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo “Usage: $0 start|stop|restart|reload”
exit 1
esac
exit 0
UPDATE: TF2 Arena server.cfg
by Logan Rogers-Follis on Jun.06, 2009, under Techie
I found that there were some random lag issues in the server.cfg I had posted, so I have edited my post and the copy in the Articles section. Please update you cfg if you are using a copy of mine!