This commit is contained in:
2023-11-25 08:42:27 -06:00
parent 29626671e9
commit 010b284c92
2 changed files with 22 additions and 16 deletions

View File

@@ -112,7 +112,7 @@ update_game() {
# args: $1 = server_modlist.txt to update
update_mods_for_server() {
msg "======= UPDATING MODS FOR: $1 ========"
msg "======= UPDATING MODS FOR MAP: $1 ========"
mods_file="$MODLISTS/$1"
map_name=${1%.txt}
@@ -271,24 +271,30 @@ update_stock_maps() {
}
main() {
check || die "Failed to pass health checks"
echo "MODLISTS: $MODLISTS"
ls "$MODLISTS" | xargs
echo
echo '--------'
echo
ls $MODLISTS | xargs
# check || die "Failed to pass health checks"
lock_remote_server
# lock_remote_server
update_server
update_game
update_stock_maps
# update_server
# update_game
# update_stock_maps
for server in $(ls "$MODLISTS" | xargs) ; do
if [ ! -f "$MODLISTS/$server" ] ; then
msg "Could not find modlist for: $MODLISTS/$server"
continue
fi
update_mods_for_server "$server"
unset server
done
# for server in $(ls "$MODLISTS" | xargs) ; do
# if [ ! -f "$MODLISTS/$server" ] ; then
# msg "Could not find modlist for: $MODLISTS/$server"
# continue
# fi
# update_mods_for_server "$server"
# unset server
# done
unlock_remote_server
# unlock_remote_server
}
main "$@" || exit 1

View File

@@ -44,7 +44,7 @@ export STOCK_SERVER_CACHE="$CACHE/stock_server"
export MOD_CACHE="$CACHE/mods"
export SERVERS="$LOCAL_DAYZ_FILES/servers"
# (4 hours, in seconds)
export RESTART_INTERVAL=$((60 * 60 * 4 + 3))
export RESTART_INTERVAL=$((60 * 60 * 4))
# ===================================================
# 03. Mount network drive