Compare commits
8 Commits
72ed93825e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ae95e1b037 | |||
| d6ec41c269 | |||
| 03a471cd0f | |||
| 725af3fcbd | |||
| 3b67e47cb6 | |||
| f91d8b3580 | |||
| f0e49e981b | |||
| 209a23db16 |
15
.drone.yml
Normal file
15
.drone.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
type: docker
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: djeeberjr/arma3
|
||||||
|
username: djeeberjr
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_HUB_TOKEN
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
@@ -12,8 +12,9 @@ RUN mkdir -p /home/steam/server && \
|
|||||||
USER steam
|
USER steam
|
||||||
|
|
||||||
VOLUME /home/steam/server
|
VOLUME /home/steam/server
|
||||||
|
VOLUME /home/steam/server/mpmissions
|
||||||
|
# VOLUME /home/steam/volumes/missions
|
||||||
VOLUME /home/steam/volumes/config
|
VOLUME /home/steam/volumes/config
|
||||||
VOLUME /home/steam/volumes/missions
|
|
||||||
VOLUME /home/steam/volumes/mods
|
VOLUME /home/steam/volumes/mods
|
||||||
VOLUME /home/steam/volumes/servermods
|
VOLUME /home/steam/volumes/servermods
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Use the `downloadMods.sh` to download mods to a volume.
|
|||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
|
|
||||||
|
`PORT` - Port to listen on. default: 2302
|
||||||
|
`LIMIT_FPS` - Limit the fps of the server
|
||||||
`STEAM_USER` - Steam username
|
`STEAM_USER` - Steam username
|
||||||
`STEAM_PASSWORD` - Steam password
|
`STEAM_PASSWORD` - Steam password
|
||||||
`WORKSHOP_COLLECTION` - id of a steam workshop collection. Used to load mods
|
`WORKSHOP_COLLECTION` - id of a steam workshop collection. Used to load mods
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ services:
|
|||||||
STEAM_USER: testo
|
STEAM_USER: testo
|
||||||
STEAM_PASSWORD: testo
|
STEAM_PASSWORD: testo
|
||||||
WORKSHOP_COLLECTION: 1400118996
|
WORKSHOP_COLLECTION: 1400118996
|
||||||
|
MOD_EXCLUDE: 667953829,1210050323,925018569,837729515,2041057379
|
||||||
volumes:
|
volumes:
|
||||||
- arma3_dev_game:/home/steam/server
|
- arma3_dev_game:/home/steam/server
|
||||||
- arma3_dev_mods:/home/steam/volumes/mods
|
- arma3_dev_mods:/home/steam/volumes/mods
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ PAYLOAD=$(cat <<EOF
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
WORKSHOP_DIR="/home/steam/Steam/steamapps/workshop/content"
|
WORKSHOP_DIR="/home/steam/Steam/steamapps/workshop/content"
|
||||||
|
MOD_DIR="\$WORKSHOP_DIR/107410"
|
||||||
|
|
||||||
mkdir -p \$WORKSHOP_DIR
|
mkdir -p \$WORKSHOP_DIR
|
||||||
rm -rf \$WORKSHOP_DIR/content
|
ln -s /home/steam/mount "\$MOD_DIR"
|
||||||
ln -s /home/steam/mount "\$WORKSHOP_DIR/107410"
|
|
||||||
|
|
||||||
echo -n "Username: "
|
echo -n "Username: "
|
||||||
read username
|
read username
|
||||||
|
|
||||||
echo "Perform initial login. Exit after successfull login. To login type login username"
|
echo "Perform initial login."
|
||||||
|
|
||||||
/home/steam/steamcmd/steamcmd.sh +login \$username +quit
|
/home/steam/steamcmd/steamcmd.sh +login \$username +quit
|
||||||
|
|
||||||
@@ -40,14 +40,25 @@ do
|
|||||||
echo "quit";
|
echo "quit";
|
||||||
} > "\$tmpFile"
|
} > "\$tmpFile"
|
||||||
|
|
||||||
echo "Downloading mod \$mod_id"
|
echo "### DOWNLOADING MOD \$mod_id ###"
|
||||||
|
|
||||||
until /home/steam/steamcmd/steamcmd.sh +runscript "\$tmpFile"; do echo -e "###\nLets try that again\n###"; done
|
until /home/steam/steamcmd/steamcmd.sh +runscript "\$tmpFile"; do echo -e "###\nLets try that again\n###"; done
|
||||||
|
|
||||||
echo -e "###\nDownload finished\n###"
|
echo "### DOWNLOAD FINISHED ###"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "### FIX CASE ###"
|
||||||
|
|
||||||
|
IFS=\$'\n'
|
||||||
|
for SRC in \$(find "\$MOD_DIR/" -depth -type f -name '*.pbo' -o -type f -name '*.bisign')
|
||||||
|
do
|
||||||
|
DST=\$(dirname "\${SRC}")/\$(basename "\${SRC}" | tr '\[A-Z\]' '\[a-z\]')
|
||||||
|
if [ "\${SRC}" != "\${DST}" ]
|
||||||
|
then
|
||||||
|
[ ! -e "\${DST}" ] && mv -vT "\${SRC}" "\${DST}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# for f in \$(find /home/steam/mount -type f -name '*.pbo' -o -type f -name '*.bisign'); do mv -v "\$f" "\$(echo \$f | tr '[A-Z]' '[a-z]')"; done
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -34,12 +34,12 @@ fi
|
|||||||
# https://community.bistudio.com/wiki/Arma_3:_Startup_Parameters#Server_Options
|
# https://community.bistudio.com/wiki/Arma_3:_Startup_Parameters#Server_Options
|
||||||
SERVER_ARGS="-name server -config=$VOLUME_HOME/config/config.cfg -profiles=$VOLUME_HOME/config/profiles"
|
SERVER_ARGS="-name server -config=$VOLUME_HOME/config/config.cfg -profiles=$VOLUME_HOME/config/profiles"
|
||||||
|
|
||||||
if [ -n "$A3_LIMIT_FPS" ]; then
|
if [ -n "$LIMIT_FPS" ]; then
|
||||||
SERVER_ARGS="${SERVER_ARGS} -limitFPS=${A3_LIMIT_FPS}"
|
SERVER_ARGS="${SERVER_ARGS} -limitFPS=${LIMIT_FPS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$A3_PORT" ]; then
|
if [ -n "$PORT" ]; then
|
||||||
SERVER_ARGS="${SERVER_ARGS} -port=${A3_PORT}"
|
SERVER_ARGS="${SERVER_ARGS} -port=${PORT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -51,24 +51,35 @@ mkdir -p "$MOD_LINK_DIR"
|
|||||||
rm -f "$MOD_LINK_DIR"/*
|
rm -f "$MOD_LINK_DIR"/*
|
||||||
|
|
||||||
MODS_TO_LOAD=""
|
MODS_TO_LOAD=""
|
||||||
|
MOD_EXCLUDE=${MOD_EXCLUDE:=""}
|
||||||
|
|
||||||
for mod_id in $(curl -s "https://steamcommunity.com/sharedfiles/filedetails/?id=$WORKSHOP_COLLECTION" | grep -E 'id="sharedfile_[0-9]+"' | sed 's/.*id="sharedfile_\([0-9]\+\)".*/\1/')
|
for mod_id in $(curl -s "https://steamcommunity.com/sharedfiles/filedetails/?id=$WORKSHOP_COLLECTION" | grep -E 'id="sharedfile_[0-9]+"' | sed 's/.*id="sharedfile_\([0-9]\+\)".*/\1/')
|
||||||
do
|
do
|
||||||
# Check if directory exists
|
|
||||||
if [ ! -d "$VOLUME_HOME/mods/$mod_id" ]; then
|
|
||||||
echo "Could not find mod directory for $mod_id"
|
|
||||||
echo "Try to download it first"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -s "$VOLUME_HOME/mods/$mod_id" "$MOD_LINK_DIR/$mod_id"
|
# Check if mod is excluded
|
||||||
MODS_TO_LOAD="${MODS_TO_LOAD}mods/${mod_id};"
|
if [[ "$MOD_EXCLUDE" != *"$mod_id"* ]]; then
|
||||||
|
# Check if directory exists
|
||||||
|
if [ ! -d "$VOLUME_HOME/mods/$mod_id" ]; then
|
||||||
|
echo "Could not find mod directory for $mod_id"
|
||||||
|
echo "Try to download it first"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -s "$VOLUME_HOME/mods/$mod_id" "$MOD_LINK_DIR/$mod_id"
|
||||||
|
MODS_TO_LOAD="${MODS_TO_LOAD}mods/${mod_id};"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$MODS_TO_LOAD" ]; then
|
if [ -n "$MODS_TO_LOAD" ]; then
|
||||||
SERVER_ARGS="${SERVER_ARGS} -mod=${MODS_TO_LOAD::-1}"
|
SERVER_ARGS="${SERVER_ARGS} -mod=${MODS_TO_LOAD::-1}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# LINK MISSIONS
|
||||||
|
#
|
||||||
|
|
||||||
|
# rm -r /home/steam/server/mpmissions
|
||||||
|
# ln -s "$VOLUME_HOME/missions" "/home/steam/server/mpmissions"
|
||||||
|
|
||||||
# SERVER_ARGS="${SERVER_ARGS} -serverMod=${SERVER_MODS}"
|
# SERVER_ARGS="${SERVER_ARGS} -serverMod=${SERVER_MODS}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user