From 31d96a98e8fb7542c80da5b14497c5aed5ca1096 Mon Sep 17 00:00:00 2001 From: Niclas Lindstedt Date: Sat, 12 Aug 2017 23:02:30 +0200 Subject: [PATCH] Read links when determining whether to copy --- scripts/start_servers.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/start_servers.sh b/scripts/start_servers.sh index d7a5463..5d74e91 100755 --- a/scripts/start_servers.sh +++ b/scripts/start_servers.sh @@ -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} @@ -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} }