|
@@ -3,7 +3,7 @@
|
|
|
# Server Management Script
|
|
# Server Management Script
|
|
|
# Author: Daniel Gibbs
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://danielgibbs.co.uk
|
|
# Website: http://danielgibbs.co.uk
|
|
|
-# Version: 010814
|
|
|
|
|
|
|
+# Version: 050814
|
|
|
|
|
|
|
|
#### Variables ####
|
|
#### Variables ####
|
|
|
|
|
|
|
@@ -25,7 +25,7 @@ ip="0.0.0.0"
|
|
|
|
|
|
|
|
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
|
|
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
|
|
|
fn_parms(){
|
|
fn_parms(){
|
|
|
-parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
|
|
|
|
|
|
|
+parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#### Advanced Variables ####
|
|
#### Advanced Variables ####
|
|
@@ -595,7 +595,8 @@ fi
|
|
|
# Create lock file
|
|
# Create lock file
|
|
|
date > ${lockselfname}
|
|
date > ${lockselfname}
|
|
|
cd "${executabledir}"
|
|
cd "${executabledir}"
|
|
|
-tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
|
|
|
|
|
|
|
+tmux new-session -d -s ${servicename} "${executable} ${parms}"
|
|
|
|
|
+tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'"
|
|
|
sleep 1
|
|
sleep 1
|
|
|
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
|
if [ ${tmuxwc} -eq 0 ]; then
|
|
if [ ${tmuxwc} -eq 0 ]; then
|
|
@@ -648,33 +649,6 @@ echo ""
|
|
|
## Installer
|
|
## Installer
|
|
|
#
|
|
#
|
|
|
|
|
|
|
|
-fn_dodappmanifest(){
|
|
|
|
|
-appdir="${filesdir}/8afa93e01174026686b12fbaf9ff54e7bffbe8fc"
|
|
|
|
|
-if [ ${pass} == 1 ]; then
|
|
|
|
|
- echo "Creating appmanifest directory. (app 90 fix)"
|
|
|
|
|
- sleep 2
|
|
|
|
|
- mkdir -v "${filesdir}"
|
|
|
|
|
- mkdir -v "${appdir}"
|
|
|
|
|
- cd "${appdir}"
|
|
|
|
|
- echo "Removing any existing appmanifest files. (app 90 fix)"
|
|
|
|
|
- sleep 2
|
|
|
|
|
- rm -f appmanifest_10.acf appmanifest_70.acf appmanifest_90.acf
|
|
|
|
|
-elif [ ${pass} == 2 ]; then
|
|
|
|
|
- echo "Downloading HLDS appmanifest files. (app 90 fix)"
|
|
|
|
|
- sleep 2
|
|
|
|
|
- cd "${appdir}"
|
|
|
|
|
- wget https://raw.github.com/dgibbs64/linuxgameservers/master/appmanifest/appmanifest_10.acf
|
|
|
|
|
- wget https://raw.github.com/dgibbs64/linuxgameservers/master/appmanifest/appmanifest_70.acf
|
|
|
|
|
- wget https://raw.github.com/dgibbs64/linuxgameservers/master/appmanifest/appmanifest_90.acf
|
|
|
|
|
-elif [ ${pass} == 3 ]; then
|
|
|
|
|
- echo "Downloading ${gamename} appmanifest files. (app 90 fix)"
|
|
|
|
|
- sleep 2
|
|
|
|
|
- cd "${appdir}"
|
|
|
|
|
- rm -f appmanifest_90.acf
|
|
|
|
|
- wget https://raw2.github.com/dgibbs64/linuxgameservers/master/appmanifest/dod/appmanifest_90.acf
|
|
|
|
|
-fi
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
fn_header(){
|
|
fn_header(){
|
|
|
clear
|
|
clear
|
|
|
echo "================================="
|
|
echo "================================="
|
|
@@ -799,14 +773,8 @@ fn_header
|
|
|
fn_steamdl
|
|
fn_steamdl
|
|
|
echo "Installing ${gamename} Server"
|
|
echo "Installing ${gamename} Server"
|
|
|
echo "================================="
|
|
echo "================================="
|
|
|
-pass=1
|
|
|
|
|
-fn_dodappmanifest
|
|
|
|
|
-pass=2
|
|
|
|
|
-fn_dodappmanifest
|
|
|
|
|
fn_steaminstall
|
|
fn_steaminstall
|
|
|
fn_steaminstall
|
|
fn_steaminstall
|
|
|
-pass=3
|
|
|
|
|
-fn_dodappmanifest
|
|
|
|
|
fn_steaminstall
|
|
fn_steaminstall
|
|
|
fn_steaminstall
|
|
fn_steaminstall
|
|
|
fn_steaminstall
|
|
fn_steaminstall
|