Browse Source

Merge pull request #85 from yuuki89/patch-1

Minor improvements, more options
pull/103/head
Daniel Gibbs 11 years ago
parent
commit
7bd3126c17
  1. 14
      NaturalSelection2/ns2server

14
NaturalSelection2/ns2server

@ -17,7 +17,7 @@ steamuser="username"
steampass="password" steampass="password"
# Start Variables # Start Variables
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
defaultmap="ns2_summit" defaultmap="ns2_summit"
port="27015" port="27015"
maxplayers="24" maxplayers="24"
@ -26,9 +26,12 @@ servername="NS2 Server"
webadminuser="admin" webadminuser="admin"
webadminpass="admin" webadminpass="admin"
webadminport="8080" webadminport="8080"
configpath="server1"
modstorage="server1/Workshop"
mods=""
password="" password=""
fn_parms(){ fn_parms(){
parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword ${webadminpass} -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -password ${password}" parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${rootdir}/${configpath}\" -modstorage \"${rootdir}/${modstorage}\" -mods \"${mods}\" -password \"${password}\""
} }
#### Advanced Variables #### #### Advanced Variables ####
@ -40,8 +43,7 @@ servicename="ns2-server"
gamename="Natural Selection 2" gamename="Natural Selection 2"
engine="spark" engine="spark"
# Directorys # Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0" selfname="$0"
filesdir="${rootdir}/serverfiles" filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}" systemdir="${filesdir}"
@ -357,7 +359,7 @@ if [ ! -z "${gamelogdir}" ]; then
echo -e "\n\nServer log\n====================\n" >> "${emaillog}" echo -e "\n\nServer log\n====================\n" >> "${emaillog}"
tail "${gamelogdir}"/*|grep -v "==>"|sed '/^$/d'|tail -25 >> "${emaillog}" tail "${gamelogdir}"/*|grep -v "==>"|sed '/^$/d'|tail -25 >> "${emaillog}"
fi fi
mail -s "${subject}" ${email} < "${emaillog}" cat -v "${emaillog}" | mail -s "${subject}" ${email}
fn_printinfo "Sent email notification to ${email}" fn_printinfo "Sent email notification to ${email}"
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
@ -816,4 +818,4 @@ case "$1" in
echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}" echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}"
exit 1;; exit 1;;
esac esac
exit exit

Loading…
Cancel
Save