update and some fixes
This commit is contained in:
parent
bf0bee766d
commit
6f849833b5
6 changed files with 34 additions and 29 deletions
|
|
@ -1,12 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
while true ; do
|
rconlist=127.0.0.1:55555,127.0.0.1:44444,127.0.0.1:33333
|
||||||
sleep $(( ( RANDOM % 360 ) + 60 ))
|
rconpass=my_rcon_password
|
||||||
LOCALAPPVER=$(cat /opt/sandstorm-server.version)
|
|
||||||
REMOTEAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public')
|
while true; do
|
||||||
EXITSTATUS=$?
|
TOTAL=0
|
||||||
if [ $EXITSTATUS -eq 0 ]; then
|
sleep $(((RANDOM % 360) + 60))
|
||||||
if [ "$LOCALAPPVER" != "$REMOTEAPPVER" ]; then
|
for rconip in $(echo "${rconlist//,/ }"); do
|
||||||
/opt/restart-ins.sh
|
PLAYERSCOUNT=$(rcon -a "$rconip" -p "$rconpass" listplayers | tail -n +3 | wc -l)
|
||||||
fi
|
TOTAL=$(("$PLAYERSCOUNT" + "$TOTAL"))
|
||||||
fi
|
done
|
||||||
done
|
if [ $TOTAL -eq 0 ]; then
|
||||||
|
LOCALAPPVER=$(cat /opt/sandstorm-server.version)
|
||||||
|
REMOTEAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public')
|
||||||
|
EXITSTATUS=$?
|
||||||
|
if [ $EXITSTATUS -eq 0 ]; then
|
||||||
|
if [ "$LOCALAPPVER" != "$REMOTEAPPVER" ]; then
|
||||||
|
/opt/restart-ins.sh
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
LOCALAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public')
|
LOCALAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public')
|
||||||
EXITSTATUS=$?
|
EXITSTATUS=$?
|
||||||
if [ $EXITSTATUS -eq 0 ]; then
|
if [ $EXITSTATUS -eq 0 ]; then
|
||||||
echo $LOCALAPPVER > /opt/sandstorm-server.version
|
echo "$LOCALAPPVER" >/opt/sandstorm-server.version
|
||||||
docker stop sandstorm-modmap
|
docker stop sandstorm-modmap
|
||||||
docker rm sandstorm-modmap
|
docker rm sandstorm-modmap
|
||||||
docker run -d --restart always --env-file /home/user/coop-modmap/modmap.env \
|
docker run -d --restart always --env-file /home/user/coop-modmap/modmap.env \
|
||||||
--name sandstorm-modmap --net=host \
|
--name sandstorm-modmap --net=host \
|
||||||
-v /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw \
|
-v /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw \
|
||||||
-v /home/user/coop-modmap/config/ini:/home/steam/steamcmd/sandstorm/Insurgency/Saved/Config/LinuxServer:ro \
|
-v /home/user/coop-modmap/config/ini:/home/steam/steamcmd/sandstorm/Insurgency/Saved/Config/LinuxServer:ro \
|
||||||
-v /home/user/coop-modmap/config/txt:/home/steam/steamcmd/sandstorm/Insurgency/Config/Server:ro andrewmhub/insurgency-sandstorm:latest
|
-v /home/user/coop-modmap/config/txt:/home/steam/steamcmd/sandstorm/Insurgency/Config/Server:ro andrewmhub/insurgency-sandstorm:latest
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
|
||||||
|
|
||||||
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
|
|
||||||
lib32gcc1 \
|
lib32gcc1 \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
|
@ -21,9 +19,7 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
rm -rf /var/lib/{apt,dpkg} /var/{cache,log} && \
|
rm -rf /var/lib/{apt,dpkg} /var/{cache,log} && \
|
||||||
su "steam" -c "./home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steam/steamcmd/sandstorm/ +app_update 581330 validate +quit"
|
su "steam" -c "./home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steam/steamcmd/sandstorm/ +app_update 581330 validate +quit"
|
||||||
|
|
||||||
WORKDIR /home/steam/steamcmd
|
WORKDIR /home/steam/steamcmd
|
||||||
USER steam
|
USER steam
|
||||||
|
|
||||||
ENTRYPOINT /home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steam/steamcmd/sandstorm/ +app_update 581330 +quit && \
|
ENTRYPOINT /home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steam/steamcmd/sandstorm/ +app_update 581330 +quit && \
|
||||||
/home/steam/steamcmd/sandstorm/Insurgency/Binaries/Linux/InsurgencyServer-Linux-Shipping -hostname="$HOSTNAME" -Port=$PORT -QueryPort=$QUERYPORT ${LAUNCH_SERVER_ENV}
|
/home/steam/steamcmd/sandstorm/Insurgency/Binaries/Linux/InsurgencyServer-Linux-Shipping -hostname="$HOSTNAME" -Port=$PORT -QueryPort=$QUERYPORT ${LAUNCH_SERVER_ENV}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
Scenario_Sheds_Checkpoint_Security
|
||||||
(Scenario="Scenario_TORO_Checkpoint_Security",Lighting="Day",Mode="Checkpoint")
|
(Scenario="Scenario_TORO_Checkpoint_Security",Lighting="Day",Mode="Checkpoint")
|
||||||
(Scenario="Scenario_TORO_Checkpoint_Security",Lighting="Night",Mode="Checkpoint")
|
|
||||||
Scenario_CompoundCity_Checkpoint_Security
|
Scenario_CompoundCity_Checkpoint_Security
|
||||||
Scenario_Highlands_Checkpoint_Security
|
Scenario_Highlands_Checkpoint_Security
|
||||||
Scenario_MountainPass_Checkpoint
|
Scenario_MountainPass_Checkpoint
|
||||||
|
|
@ -7,12 +7,10 @@ Scenario_Noshahr_Canals_Checkpoint_Security
|
||||||
Scenario_Prison_Checkpoint_Security
|
Scenario_Prison_Checkpoint_Security
|
||||||
Scenario_Macedonia_Checkpoint_Security
|
Scenario_Macedonia_Checkpoint_Security
|
||||||
(Scenario="Scenario_ps_cp_sec",Mode="Checkpoint",Lighting="Day")
|
(Scenario="Scenario_ps_cp_sec",Mode="Checkpoint",Lighting="Day")
|
||||||
(Scenario="Scenario_ps_cp_sec",Mode="Checkpoint",Lighting="Night")
|
|
||||||
Scenario_Frost_Checkpoint_Security
|
Scenario_Frost_Checkpoint_Security
|
||||||
Scenario_SultanOfDrugs_Checkpoint_Security
|
Scenario_SultanOfDrugs_Checkpoint_Security
|
||||||
Scenario_Mud_Village_Checkpoint_Security
|
Scenario_Mud_Village_Checkpoint_Security
|
||||||
(Scenario="Scenario_Temple_CP_Sec",Mode="Checkpoint",Lighting="Day")
|
(Scenario="Scenario_Temple_CP_Sec",Mode="Checkpoint",Lighting="Day")
|
||||||
(Scenario="Scenario_Temple_CP_Sec",Mode="Checkpoint",Lighting="Night")
|
|
||||||
(Scenario="Scenario_Safehouse_Checkpoint_Security",Lighting="Day")
|
(Scenario="Scenario_Safehouse_Checkpoint_Security",Lighting="Day")
|
||||||
Scenario_Diplomacy_Checkpoint_Security
|
Scenario_Diplomacy_Checkpoint_Security
|
||||||
Scenario_SaltMine_Checkpoint_Security
|
Scenario_SaltMine_Checkpoint_Security
|
||||||
|
|
@ -26,7 +24,10 @@ Scenario_Oasis_Checkpoint_Security
|
||||||
(Scenario="Scenario_Stork_Castle_Checkpoint_Security",Lighting="Day")
|
(Scenario="Scenario_Stork_Castle_Checkpoint_Security",Lighting="Day")
|
||||||
(Scenario="Scenario_Factory_Checkpoint_Security",Lighting="Day")
|
(Scenario="Scenario_Factory_Checkpoint_Security",Lighting="Day")
|
||||||
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Day")
|
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Day")
|
||||||
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Night")
|
|
||||||
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Rain")
|
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Rain")
|
||||||
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Winter")
|
(Scenario="Scenario_RedwoodReborn_Checkpoint",Lighting="Winter")
|
||||||
Scenario_TheGreenZone_Checkpoint_Security
|
Scenario_TheGreenZone_Checkpoint_Security
|
||||||
|
Scenario_AbadHills_Checkpoint_Security
|
||||||
|
(Scenario="Scenario_der_Riese_CP_Sec",Mode="Checkpoint",Lighting="Day")
|
||||||
|
(Scenario="Scenario_PeakReborn_Checkpoint",Lighting="Day")
|
||||||
|
(Scenario="Scenario_City_Checkpoint_Security",Lighting="Day")
|
||||||
|
|
@ -31,5 +31,3 @@
|
||||||
760053; GreenZone
|
760053; GreenZone
|
||||||
132183; WelcomeMessage
|
132183; WelcomeMessage
|
||||||
101966; Join Leave Message
|
101966; Join Leave Message
|
||||||
751403; FpLegs
|
|
||||||
98685; Jump Shoot
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
HOSTNAME=[ISMC] MOD MAPS ONLY @120hz
|
HOSTNAME=[ISMC] MOD MAPS ONLY @120hz
|
||||||
PORT=12345
|
PORT=12345
|
||||||
QUERYPORT=54321
|
QUERYPORT=54321
|
||||||
LAUNCH_SERVER_ENV=-MapCycle=MapCycle -Mods ModList=Mods.txt -mutators=ISMCarmory_legacy,ImprovedAI,NoRestrictedArea,ScaleBotAmount,AdvancedSupplyPoints,WelcomeMessage,JoinLeaveMessage,FpLegs,JumpShoot -GameStatsToken=my_token -GameStats -GSLTToken=my_token -ModDownloadTravelTo=TORO?Scenario=Scenario_TORO_Checkpoint_Security
|
LAUNCH_SERVER_ENV=-MapCycle=MapCycle -Mods ModList=Mods.txt -mutators=ISMCarmory_legacy,ImprovedAI,NoRestrictedArea,ScaleBotAmount,AdvancedSupplyPoints,WelcomeMessage,JoinLeaveMessage -GameStatsToken=my_token -GameStats -GSLTToken=my_token -ModDownloadTravelTo=TORO?Scenario=Scenario_TORO_Checkpoint_Security
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue