From ecc042eedd1864bd463037edbd402926b3bb6807 Mon Sep 17 00:00:00 2001 From: Niclas Lindstedt Date: Sat, 12 Aug 2017 23:16:55 +0200 Subject: [PATCH] Don't overwrite config files on start of containers --- scripts/start_servers.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/start_servers.sh b/scripts/start_servers.sh index 5d74e91..6b4ad2e 100755 --- a/scripts/start_servers.sh +++ b/scripts/start_servers.sh @@ -89,70 +89,70 @@ start_port() { [ ! -L $installdir/ktx/demos ] && { echo "* Creating demos folder" - cp -r $installdir/ktx/demos ~/.nquakesv/server/demos + [ ! -d ~/.nquakesv/server/demos ] && cp -r $installdir/ktx/demos ~/.nquakesv/server/demos rm -rf $installdir/ktx/demos ln -s ~/.nquakesv/server/demos $installdir/ktx/demos } [ ! -L $installdir/qtv/qtv_template.cfg ] && { echo "* Copying qtv.cfg to nquakesv configuration folder" - cp $installdir/qtv/qtv_template.cfg ~/.nquakesv/server/qtv.cfg + [ ! -f ~/.nquakesv/server/qtv.cfg ] && cp $installdir/qtv/qtv_template.cfg ~/.nquakesv/server/qtv.cfg rm $installdir/qtv/qtv_template.cfg ln -s ~/.nquakesv/server/qtv.cfg $installdir/qtv/qtv_template.cfg } [ ! -L $installdir/qwfwd/qwfwd_template.cfg ] && { echo "* Copying qwfwd.cfg to nquakesv configuration folder" - cp $installdir/qwfwd/qwfwd_template.cfg ~/.nquakesv/server/qwfwd.cfg + [ ! -f ~/.nquakesv/server/qwfwd.cfg ] && cp $installdir/qwfwd/qwfwd_template.cfg ~/.nquakesv/server/qwfwd.cfg rm $installdir/qwfwd/qwfwd_template.cfg ln -s ~/.nquakesv/server/qwfwd.cfg $installdir/qwfwd/qwfwd_template.cfg } [ ! -L $installdir/ktx/port_template.cfg ] && { echo "* Copying port.cfg to nquakesv configuration folder" - cp $installdir/ktx/port_template.cfg ~/.nquakesv/server/port.cfg + [ ! -f ~/.nquakesv/server/port.cfg ] && cp $installdir/ktx/port_template.cfg ~/.nquakesv/server/port.cfg rm $installdir/ktx/port_template.cfg ln -s ~/.nquakesv/server/port.cfg $installdir/ktx/port_template.cfg } [ ! -L $installdir/ktx/ktx.cfg ] && { echo "* Copying ktx.cfg to nquakesv configuration folder" - cp $installdir/ktx/ktx.cfg ~/.nquakesv/server/ktx.cfg + [ ! -f ~/.nquakesv/server/ktx.cfg ] && cp $installdir/ktx/ktx.cfg ~/.nquakesv/server/ktx.cfg rm $installdir/ktx/ktx.cfg ln -s ~/.nquakesv/server/ktx.cfg $installdir/ktx/ktx.cfg } [ ! -L $installdir/ktx/mvdsv.cfg ] && { echo "* Copying mvdsv.cfg to nquakesv configuration folder" - cp $installdir/ktx/mvdsv.cfg ~/.nquakesv/server/mvdsv.cfg + [ ! -f ~/.nquakesv/server/mvdsv.cfg ] && cp $installdir/ktx/mvdsv.cfg ~/.nquakesv/server/mvdsv.cfg rm $installdir/ktx/mvdsv.cfg ln -s ~/.nquakesv/server/mvdsv.cfg $installdir/ktx/mvdsv.cfg } [ ! -L $installdir/ktx/pwd.cfg ] && { echo "* Copying passwords.cfg to nquakesv configuration folder" - cp $installdir/ktx/pwd.cfg ~/.nquakesv/server/passwords.cfg + [ ! -f ~/.nquakesv/server/passwords.cfg ] && cp $installdir/ktx/pwd.cfg ~/.nquakesv/server/passwords.cfg rm $installdir/ktx/pwd.cfg ln -s ~/.nquakesv/server/passwords.cfg $installdir/ktx/pwd.cfg } [ ! -L $installdir/ktx/matchless.cfg ] && { echo "* Copying matchless.cfg to nquakesv configuration folder" - cp $installdir/ktx/matchless.cfg ~/.nquakesv/server/matchless.cfg + [ ! -f ~/.nquakesv/server/matchless.cfg ] && cp $installdir/ktx/matchless.cfg ~/.nquakesv/server/matchless.cfg rm $installdir/ktx/matchless.cfg ln -s ~/.nquakesv/server/matchless.cfg $installdir/ktx/matchless.cfg } [ ! -L $installdir/ktx/vip_ip.cfg ] && { echo "* Copying vip_ip.cfg to nquakesv configuration folder" - cp $installdir/ktx/vip_ip.cfg ~/.nquakesv/server/vip_ip.cfg + [ ! -f ~/.nquakesv/server/vip_ip.cfg ] && cp $installdir/ktx/vip_ip.cfg ~/.nquakesv/server/vip_ip.cfg rm $installdir/ktx/vip_ip.cfg ln -s ~/.nquakesv/server/vip_ip.cfg $installdir/ktx/vip_ip.cfg } [ ! -L $installdir/ktx/ban_ip.cfg ] && { echo "* Copying ban_ip.cfg to nquakesv configuration folder" - cp $installdir/ktx/ban_ip.cfg ~/.nquakesv/server/ban_ip.cfg + [ ! -f ~/.nquakesv/server/ban_ip.cfg ] && cp $installdir/ktx/ban_ip.cfg ~/.nquakesv/server/ban_ip.cfg rm $installdir/ktx/ban_ip.cfg ln -s ~/.nquakesv/server/ban_ip.cfg $installdir/ktx/ban_ip.cfg }