From 8410dada1e332d79517ec68d5ae3f45aeaf6424d Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 01:29:23 +0200 Subject: [PATCH 01/18] Update Dockerfile --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c7e6d9..866ec81 100755 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,7 @@ ENV EXTRA="" ENV SERVERTYPE="" ENV EXECFILE="" -RUN apt-get update && \ - apt-get install -y gcc-multilib g++-multilib unzip curl +RUN apt-get install -y unzip curl RUN groupadd -r cod4 && useradd --no-log-init -r -g cod4 cod4 ADD cod4 /home/cod4/ @@ -21,4 +20,4 @@ WORKDIR /home/cod4 RUN chmod +x script.sh ENTRYPOINT ["/home/cod4/script.sh"] -VOLUME ["/home/cod4/gamefiles/"] \ No newline at end of file +VOLUME ["/home/cod4/gamefiles/"] From e2a9cb36b84794ca2963afa1f7c03b85b184221a Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 01:50:25 +0200 Subject: [PATCH 02/18] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 866ec81..1be9173 100755 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,8 @@ ENV EXTRA="" ENV SERVERTYPE="" ENV EXECFILE="" -RUN apt-get install -y unzip curl +RUN apt-get update && \ + apt-get install -y unzip curl RUN groupadd -r cod4 && useradd --no-log-init -r -g cod4 cod4 ADD cod4 /home/cod4/ From c1d6473b200a49599a9f919656c0507ddfa99e63 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 01:57:41 +0200 Subject: [PATCH 03/18] Update Dockerfile --- Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1be9173..ff4f503 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM ubuntu - -# Running options to COD4 server +# Running options to COD4 server ENV READY="" ENV PORT="28960" ENV MODNAME="" @@ -8,17 +7,21 @@ ENV MAP="+map_rotate" ENV EXTRA="" ENV SERVERTYPE="" ENV EXECFILE="" - +# Installing dependencies RUN apt-get update && \ - apt-get install -y unzip curl - + apt-get install -y gcc-multilib g++-multilib unzip curl +# Adding user: cod4 RUN groupadd -r cod4 && useradd --no-log-init -r -g cod4 cod4 +# Adding files from github ADD cod4 /home/cod4/ +# Setting permissions RUN chown -R cod4:cod4 /home/cod4 USER cod4 WORKDIR /home/cod4 + +# Making file executable RUN chmod +x script.sh -ENTRYPOINT ["/home/cod4/script.sh"] +ENTRYPOINT ["/home/cod4/script.sh"] VOLUME ["/home/cod4/gamefiles/"] From c720d006427b1da307b5eeae942370709039c69e Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 02:06:44 +0200 Subject: [PATCH 04/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ff4f503..85da11c 100755 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV SERVERTYPE="" ENV EXECFILE="" # Installing dependencies RUN apt-get update && \ - apt-get install -y gcc-multilib g++-multilib unzip curl + apt-get install -y unzip curl # Adding user: cod4 RUN groupadd -r cod4 && useradd --no-log-init -r -g cod4 cod4 # Adding files from github From 3f2f1b04d69a6128619b998de06387fd269ceefc Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 02:20:35 +0200 Subject: [PATCH 05/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 85da11c..ff4f503 100755 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV SERVERTYPE="" ENV EXECFILE="" # Installing dependencies RUN apt-get update && \ - apt-get install -y unzip curl + apt-get install -y gcc-multilib g++-multilib unzip curl # Adding user: cod4 RUN groupadd -r cod4 && useradd --no-log-init -r -g cod4 cod4 # Adding files from github From 2cb2d84309f74d7da8139288906cea3c6d0d3b81 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 13:23:31 +0200 Subject: [PATCH 06/18] Update Dockerfile --- Dockerfile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff4f503..e954ef9 100755 --- a/Dockerfile +++ b/Dockerfile @@ -7,21 +7,23 @@ ENV MAP="+map_rotate" ENV EXTRA="" ENV SERVERTYPE="" ENV EXECFILE="" +ENV PUID="1000" +ENV GUID="1000" +# Setting a volume +VOLUME ["/home/cod4/gamefiles/"] # Installing dependencies RUN apt-get update && \ apt-get install -y gcc-multilib g++-multilib unzip curl -# Adding user: cod4 -RUN groupadd -r cod4 && useradd --no-log-init -r -g cod4 cod4 +WORKDIR /home/cod4/gamefiles # Adding files from github ADD cod4 /home/cod4/ -# Setting permissions -RUN chown -R cod4:cod4 /home/cod4 - -USER cod4 -WORKDIR /home/cod4 - -# Making file executable -RUN chmod +x script.sh - +# Adding user "cod4" and setting permissions +RUN adduser --system cod4 --home /home/cod4 --uid 1000 && \ + chown -R cod4 /home/cod4 && \ + chmod -R 777 /home/cod4 && \ + chown -R cod4 /home/cod4/gamefiles && \ + chmod -R 777 /home/cod4/gamefiles && \ + # Making file executable + chmod +x /home/cod4/script.sh ENTRYPOINT ["/home/cod4/script.sh"] -VOLUME ["/home/cod4/gamefiles/"] +USER cod4 From c1055fee19c9b4d31939d650fbcc0770cebe32c9 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 13:57:18 +0200 Subject: [PATCH 07/18] Update script.sh --- cod4/script.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/cod4/script.sh b/cod4/script.sh index fd9ff7b..8de7b4d 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -if [ "$(ls -A gamefiles/main)" ]; then +if [ "$(ls -A main)" ]; then echo "Main is Good" echo "Testing if xbase_00.iwd is in main" - if [[ ! -f gamefiles/main/xbase_00.iwd ]]; then + if [[ ! -f main/xbase_00.iwd ]]; then echo "Xbase_00.iwd not found copying it now" - cp xbase_00.iwd gamefiles/main/ + cp xbase_00.iwd main/ else echo "Xbase_00.iwd is Good" fi @@ -12,29 +12,29 @@ else echo "ERROR Main is Empty" fi -if [ "$(ls -A gamefiles/mods)" ]; then +if [ "$(ls -A mods)" ]; then echo "Mods Good" else echo "ERROR Mods is Empty" fi -if [ "$(ls -A gamefiles/usermaps)" ]; then +if [ "$(ls -A usermaps)" ]; then echo "Usermaps Good" else echo "ERROR Usermaps is Empty" fi -if [ "$(ls -A gamefiles/zone)" ]; then +if [ "$(ls -A zone)" ]; then echo "Zone is Good" else echo "ERROR Zone is Empty" fi -if [ ! -f gamefiles/cod4x18_dedrun ]; then +if [ ! -f cod4x18_dedrun ]; then echo "cod4x18_dedrun not found... trying to download it." - curl https://raw.githubusercontent.com/henkall/docker-cod4/master/cod4xfiles.zip -o cod4xfiles.zip && unzip -o cod4xfiles.zip -d gamefiles && rm cod4xfiles.zip + curl https://raw.githubusercontent.com/henkall/docker-cod4/master/cod4xfiles.zip -o cod4xfiles.zip && unzip -o cod4xfiles.zip && rm cod4xfiles.zip echo "Download Done" - chmod +x gamefiles/cod4x18_dedrun + chmod +x cod4x18_dedrun echo ready else - chmod +x gamefiles/cod4x18_dedrun + chmod +x cod4x18_dedrun echo "cod4x18_dedrun found" fi echo "Setting server type" @@ -67,11 +67,9 @@ if [[ ! -z "${READY}" ]]; then echo "Config is Ready" if [[ ! -z "${MODNAME}" ]]; then echo "Mod enabled (using $MODNAME mod)" - cd gamefiles ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "+set fs_game mods/$MODNAME" "$EXTRA" "+exec $EXECFILE" "$MAP" else echo "Not using Mod" - cd gamefiles ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "$EXTRA" "+exec $EXECFILE" "$MAP" fi From 9eef79fb541e6d2d8a6aad5448c4d6e1687c3f76 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 13:58:43 +0200 Subject: [PATCH 08/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e954ef9..cc3773e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN apt-get update && \ apt-get install -y gcc-multilib g++-multilib unzip curl WORKDIR /home/cod4/gamefiles # Adding files from github -ADD cod4 /home/cod4/ +ADD cod4 /home/cod4/gamefiles/ # Adding user "cod4" and setting permissions RUN adduser --system cod4 --home /home/cod4 --uid 1000 && \ chown -R cod4 /home/cod4 && \ From cba776c6eee9b8f72ba8cf13afc360a04f1a0a52 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 14:15:58 +0200 Subject: [PATCH 09/18] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc3773e..931b568 100755 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,6 @@ RUN adduser --system cod4 --home /home/cod4 --uid 1000 && \ chown -R cod4 /home/cod4/gamefiles && \ chmod -R 777 /home/cod4/gamefiles && \ # Making file executable - chmod +x /home/cod4/script.sh -ENTRYPOINT ["/home/cod4/script.sh"] + chmod +x /home/cod4/gamefiles/script.sh +ENTRYPOINT ["/home/cod4/gamefiles/script.sh"] USER cod4 From 3e8cbd1c1a79d2f53679839ebaa936049729ba6b Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 14:29:55 +0200 Subject: [PATCH 10/18] Update Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 931b568..608a9bf 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN apt-get update && \ apt-get install -y gcc-multilib g++-multilib unzip curl WORKDIR /home/cod4/gamefiles # Adding files from github -ADD cod4 /home/cod4/gamefiles/ +COPY --chown=1000 cod4/script.sh /home/cod4/ # Adding user "cod4" and setting permissions RUN adduser --system cod4 --home /home/cod4 --uid 1000 && \ chown -R cod4 /home/cod4 && \ @@ -24,6 +24,6 @@ RUN adduser --system cod4 --home /home/cod4 --uid 1000 && \ chown -R cod4 /home/cod4/gamefiles && \ chmod -R 777 /home/cod4/gamefiles && \ # Making file executable - chmod +x /home/cod4/gamefiles/script.sh -ENTRYPOINT ["/home/cod4/gamefiles/script.sh"] + chmod +x /home/cod4/script.sh +ENTRYPOINT ["/home/cod4/script.sh"] USER cod4 From fcd9be911ea95fd34aeb13bfd3fadb08e15ad7e1 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 18:34:12 +0200 Subject: [PATCH 11/18] Update script.sh --- cod4/script.sh | 68 +++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/cod4/script.sh b/cod4/script.sh index 8de7b4d..ed6eeb6 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -1,42 +1,52 @@ #!/usr/bin/env bash -if [ "$(ls -A main)" ]; then - echo "Main is Good" - echo "Testing if xbase_00.iwd is in main" - if [[ ! -f main/xbase_00.iwd ]]; then - echo "Xbase_00.iwd not found copying it now" - cp xbase_00.iwd main/ - else - echo "Xbase_00.iwd is Good" - fi +if [ -d "main" ] +then + echo "Directory main exists." else -echo "ERROR Main is Empty" + echo "ERROR: Directory main is missing." fi - -if [ "$(ls -A mods)" ]; then - echo "Mods Good" +if [ -d "zone" ] +then + echo "Directory zone exists." else - echo "ERROR Mods is Empty" + echo "ERROR: Directory zone is missing" fi -if [ "$(ls -A usermaps)" ]; then - echo "Usermaps Good" +if [ -d "mods" ] +then + echo "Directory mods exists." else - echo "ERROR Usermaps is Empty" + echo "ERROR: Directory mods is missing" fi -if [ "$(ls -A zone)" ]; then - echo "Zone is Good" +if [ -d "usermaps" ] +then + echo "Directory usermaps exists." else - echo "ERROR Zone is Empty" + echo "ERROR: Directory usermaps is missing" fi -if [ ! -f cod4x18_dedrun ]; then - echo "cod4x18_dedrun not found... trying to download it." - curl https://raw.githubusercontent.com/henkall/docker-cod4/master/cod4xfiles.zip -o cod4xfiles.zip && unzip -o cod4xfiles.zip && rm cod4xfiles.zip - echo "Download Done" - chmod +x cod4x18_dedrun - echo ready -else - chmod +x cod4x18_dedrun - echo "cod4x18_dedrun found" +if [ -d "/home/cod4/gamefiles" ] +then + echo "Directory gamefiles exists" + folderperm=$(stat --format '%a' gamefiles) + echo $folderperm + if [ $folderperm -eq 2777 -o $folderperm -eq 777 ] + then + echo "Permissions fine" + if [ ! -f cod4x18_dedrun ] + then + echo "cod4x18_dedrun not found... trying to download it." + curl https://raw.githubusercontent.com/henkall/docker-cod4/master/cod4xfiles.zip -o cod4xfiles.zip && unzip -o cod4xfiles.zip && rm cod4xfiles.zip + echo "Download Done" + chmod +x cod4x18_dedrun + echo ready + else + chmod +x cod4x18_dedrun + echo "cod4x18_dedrun found" + fi + else + echo "Permissions on folder has to be 777 or 2777" + fi fi + echo "Setting server type" if [[ -z "${SERVERTYPE}" ]]; then echo "The SERVERTYPE variable is empty." From a37fd6662dfff34b5e793696f9e9af9e20308cbb Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 18:46:23 +0200 Subject: [PATCH 12/18] Update script.sh --- cod4/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cod4/script.sh b/cod4/script.sh index ed6eeb6..8ba6bd2 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -26,7 +26,7 @@ fi if [ -d "/home/cod4/gamefiles" ] then echo "Directory gamefiles exists" - folderperm=$(stat --format '%a' gamefiles) + folderperm=$(stat --format '%a' /home/cod4/gamefiles) echo $folderperm if [ $folderperm -eq 2777 -o $folderperm -eq 777 ] then From 1b9f15febcdcdd338f67cba212111ac1d58f5b2b Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 19:12:13 +0200 Subject: [PATCH 13/18] Code cleanup --- cod4/script.sh | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/cod4/script.sh b/cod4/script.sh index 8ba6bd2..2512dad 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -41,46 +41,60 @@ then else chmod +x cod4x18_dedrun echo "cod4x18_dedrun found" + servergood=1 fi else - echo "Permissions on folder has to be 777 or 2777" + servergood=0 + echo "ERROR: Permissions on gamfiles folder has to be 777 or 2777" fi fi echo "Setting server type" -if [[ -z "${SERVERTYPE}" ]]; then +if [ -z "${SERVERTYPE}" ] +then echo "The SERVERTYPE variable is empty." SERVERTYPE="1" fi echo "Setting port" -if [[ -z "${PORT}" ]]; then +if [ -z "${PORT}" ] +then echo "The PORT variable is empty." PORT="28960" fi echo "Setting EXTRA arg" -if [[ -z "${EXTRA}" ]]; then +if [ -z "${EXTRA}" ] +then echo "The EXTRA variable is empty." EXTRA="+set sv_authorizemode -1" fi echo "Setting exec file" -if [[ -z "${EXECFILE}" ]]; then +if [ -z "${EXECFILE}" ] +then echo "The EXECFILE variable is empty." EXECFILE="server.cfg" fi echo "Setting MAP" -if [[ -z "${MAP}" ]]; then +if [ -z "${MAP}" ] +then echo "The MAP variable is empty." MAP="+map_rotate" fi echo "Checking if READY" -if [[ ! -z "${READY}" ]]; then - echo "Config is Ready" - if [[ ! -z "${MODNAME}" ]]; then - echo "Mod enabled (using $MODNAME mod)" - ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "+set fs_game mods/$MODNAME" "$EXTRA" "+exec $EXECFILE" "$MAP" - else - echo "Not using Mod" - ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "$EXTRA" "+exec $EXECFILE" "$MAP" - fi +if [ $servergood ] +then + if [ ! -z "${READY}" ] + then + echo "Config is Ready" + if [[ ! -z "${MODNAME}" ]]; then + echo "Mod enabled (using $MODNAME mod)" + ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "+set fs_game mods/$MODNAME" "$EXTRA" "+exec $EXECFILE" "$MAP" + else + echo "Not using Mod" + ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "$EXTRA" "+exec $EXECFILE" "$MAP" + fi + + fi +else + echo "ERROR: Permissions on gamefiles folder has to be 777 or 2777" fi From c8bd4bc74d7fb114e716c5c92cd14c0db1339b61 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 19:29:11 +0200 Subject: [PATCH 14/18] Update script.sh --- cod4/script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cod4/script.sh b/cod4/script.sh index 2512dad..f34a1d5 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -41,10 +41,10 @@ then else chmod +x cod4x18_dedrun echo "cod4x18_dedrun found" - servergood=1 + servergood=0 fi else - servergood=0 + servergood=1 echo "ERROR: Permissions on gamfiles folder has to be 777 or 2777" fi fi From 2fab737c5464bfa14ab688f39e96c7d66ee57b89 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 19:39:34 +0200 Subject: [PATCH 15/18] Update script.sh --- cod4/script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cod4/script.sh b/cod4/script.sh index f34a1d5..6766f4b 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -41,10 +41,10 @@ then else chmod +x cod4x18_dedrun echo "cod4x18_dedrun found" - servergood=0 + servergood=1 fi else - servergood=1 + servergood=0 echo "ERROR: Permissions on gamfiles folder has to be 777 or 2777" fi fi @@ -80,7 +80,7 @@ then MAP="+map_rotate" fi echo "Checking if READY" -if [ $servergood ] +if [ $servergood -eq 1 ] then if [ ! -z "${READY}" ] From 6bb2345618d00a6786d3b01ee35595f8d5497c25 Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 20:06:10 +0200 Subject: [PATCH 16/18] Update script.sh --- cod4/script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cod4/script.sh b/cod4/script.sh index 6766f4b..13545c1 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -42,9 +42,11 @@ then chmod +x cod4x18_dedrun echo "cod4x18_dedrun found" servergood=1 + echo $servergood fi else servergood=0 + echo $servergood echo "ERROR: Permissions on gamfiles folder has to be 777 or 2777" fi fi From b13ad732814d03a9acb85424640f3a235176a46b Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 20:08:19 +0200 Subject: [PATCH 17/18] Update script.sh --- cod4/script.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cod4/script.sh b/cod4/script.sh index 13545c1..ffec8f7 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -84,7 +84,7 @@ fi echo "Checking if READY" if [ $servergood -eq 1 ] then - + echo "server is good" if [ ! -z "${READY}" ] then echo "Config is Ready" @@ -95,7 +95,6 @@ then echo "Not using Mod" ./cod4x18_dedrun "+set dedicated $SERVERTYPE" "+set net_port $PORT" "$EXTRA" "+exec $EXECFILE" "$MAP" fi - fi else echo "ERROR: Permissions on gamefiles folder has to be 777 or 2777" From 00a4242ee163a92d3ec2a9309eff5c695c214ebd Mon Sep 17 00:00:00 2001 From: Henrik S Nielsen <1741035+henkall@users.noreply.github.com> Date: Fri, 26 Jun 2020 20:19:24 +0200 Subject: [PATCH 18/18] Update script.sh --- cod4/script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cod4/script.sh b/cod4/script.sh index ffec8f7..31a173c 100644 --- a/cod4/script.sh +++ b/cod4/script.sh @@ -38,6 +38,8 @@ then echo "Download Done" chmod +x cod4x18_dedrun echo ready + servergood=1 + echo $servergood else chmod +x cod4x18_dedrun echo "cod4x18_dedrun found"