Browse Source

Moved port detection out of main script

pull/254/merge
Daniel Gibbs 10 years ago
parent
commit
d3616d9c83
  1. 9
      Arma3/arma3server

9
Arma3/arma3server

@ -4,7 +4,7 @@
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Contributor: Scarsz # Contributor: Scarsz
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 011214 # Version: 081214
#### Variables #### #### Variables ####
@ -47,11 +47,8 @@ servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
backupdir="backups" backupdir="backups"
# Server Details # Server Details Cont.
servername=$(grep -s hostname "${servercfgfullpath}"|sed -e 's/\<hostname\>//g'| tr -d '=\"; ') servername=$(grep -s hostname "${servercfgfullpath}"| grep -v //|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
serverport=$(sed -n -e '10 p' ${servercfgfullpath} 2>/dev/null| sed 's/[\/\; ]//g' | tr -cd [:digit:])
queryport=$(sed -n -e '14 p' ${servercfgfullpath} 2>/dev/null| sed 's/[\/\; ]//g' | tr -cd [:digit:])
masterport=$(sed -n -e '12 p' ${servercfgfullpath} 2>/dev/null| sed 's/[\/\; ]//g' | tr -cd [:digit:])
# Logging # Logging
logdays="7" logdays="7"

Loading…
Cancel
Save