Skip to content

Commit

Permalink
Read links when determining whether to copy
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaslindstedt committed Aug 12, 2017
1 parent 1a4cf32 commit 31d96a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/start_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ generate_server_config() {
outputfile=${SCRIPTFOLDER}/ktx/pwd.cfg
echo "rcon_password \"${SV_RCON}\"" > ${inputfile}
echo "qtv_password \"${SV_QTVPASS}\"" >> ${inputfile}
[ "$inputfile" != "$outputfile" ] && cp -fn ${inputfile} ${outputfile}
[ "$(readlink -f $inputfile)" != "$(readlink -f $outputfile)" ] && cp -fn ${inputfile} ${outputfile}
}

generate_qtv_config() {
port=$1
inputfile=$2
outputfile=$3
[ "$inputfile" != "$outputfile" ] && cp -r ${inputfile} ${outputfile}
[ "$(readlink -f $inputfile)" != "$(readlink -f $outputfile)" ] && cp -r ${inputfile} ${outputfile}
echo "hostname \"${SV_HOSTNAME} Qtv\"" >> ${outputfile}
echo "admin_password \"${SV_QTVPASS}\"" >> ${outputfile}
echo "mvdport ${port}" >> ${outputfile}
Expand All @@ -38,7 +38,7 @@ generate_qwfwd_config() {
port=$1
inputfile=${SCRIPTFOLDER}/qwfwd/qwfwd_template.cfg
outputfile=$2
[ "$inputfile" != "$outputfile" ] && cp -r ${inputfile} ${outputfile}
[ "$(readlink -f $inputfile)" != "$(readlink -f $outputfile)" ] && cp -r ${inputfile} ${outputfile}
echo "set hostname \"${SV_HOSTNAME} QWfwd\"" >> ${outputfile}
echo "set net_port ${port}" >> ${outputfile}
}
Expand Down

0 comments on commit 31d96a9

Please sign in to comment.