Compare commits
101 Commits
ded9963beb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d64f62977b | |||
| 1205108c34 | |||
| fcc86b3760 | |||
| 0ebab689b7 | |||
| 95e5ff889b | |||
| 65e4aa16a0 | |||
| dfe20d9fed | |||
| a9a87303c2 | |||
| 7dec690284 | |||
| b25a761c6a | |||
| 29cd2e3ec0 | |||
| 0fe8c31b72 | |||
| bb3ac16365 | |||
| 4d3b0104f4 | |||
| 250f1f7dba | |||
| c66cacd231 | |||
| 51f9571b8c | |||
| 457f8d7618 | |||
| 89dc477d56 | |||
| a2cb09a706 | |||
| f3ff162162 | |||
| 02120d559e | |||
| d43c1205b2 | |||
| 4f1ea6ab15 | |||
| 867861e7a2 | |||
| 252661ad27 | |||
| 2671f86053 | |||
| 49ebe57241 | |||
| c13fca9b81 | |||
| 46d218189e | |||
| 90298eda14 | |||
| 7af7b14d60 | |||
| 3304edea4f | |||
| f42faa5a2b | |||
| 021fedd120 | |||
| b499c3a0f5 | |||
| d3fa93811c | |||
| 010b284c92 | |||
| 29626671e9 | |||
| 8281959706 | |||
| a604dd7cf0 | |||
| 81dcff095f | |||
| 2828628054 | |||
| d6b656b1c2 | |||
| 71c8eb7e27 | |||
| d594545288 | |||
| e00eb2c791 | |||
| d760fc07ae | |||
| 0cb5962c60 | |||
| da9412b1af | |||
| c901a10a6a | |||
| 4a718e39e4 | |||
| 4bc6f900b3 | |||
| aea0f80e6c | |||
| feba84fc29 | |||
| 83a1517a50 | |||
| 7ad7f72fbc | |||
| c6433c254e | |||
| 9d3b5e583c | |||
| 979bb8a310 | |||
| e5bfc97225 | |||
| e8cea139a0 | |||
| 0fed5f3a85 | |||
| ecff0eab79 | |||
| 1709319496 | |||
| 03ba9bc1bc | |||
| 99a8e96db7 | |||
| 5e1e8045fe | |||
| c89798289c | |||
| 270c0ff2f2 | |||
| 7935bad092 | |||
| 1dcdddf2a7 | |||
| 857e163763 | |||
| 920b7da772 | |||
| b30c0187d0 | |||
| f448fd12c6 | |||
| f190e47f69 | |||
| 2f00167519 | |||
| d453db748f | |||
| 1acaea558d | |||
| c718676fa0 | |||
| b273607052 | |||
| ddcfe9e2a3 | |||
| 366253f1f9 | |||
| cdf31ce541 | |||
| 4b0a9ee901 | |||
| 12105271d7 | |||
| 6be29407b1 | |||
| 0c036832be | |||
| d709397585 | |||
| cb35daab78 | |||
| 1118bdaa15 | |||
| ab5069deb9 | |||
| 01b578a564 | |||
| 5ecd4c4f59 | |||
| 69ec6bd7be | |||
| bc2661b93f | |||
| 2ca83e25d9 | |||
| f0b1709f1c | |||
| 67d33f4967 | |||
| 60b6fe9bff |
403
ORIGINAL_start.sh
Normal file
403
ORIGINAL_start.sh
Normal file
@@ -0,0 +1,403 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# shellcheck disable=2043
|
||||
#
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# General Settings
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# export DAYZ_FILES=/mnt/dayz
|
||||
# export STOCK_SERVER_DATA="$DAYZ_FILES/stock/DayZServer"
|
||||
# export MAIN="/mnt/c/DAYZ"
|
||||
# export SERVERS="$MAIN/servers"
|
||||
# export CACHE="$MAIN/cache"
|
||||
# export MOD_CACHE="$CACHE/mods"
|
||||
|
||||
# ORIGINAL_DIR="$PWD"
|
||||
# export RESTART_INTERVAL=$((60 * 60 * 4 + 3))
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Helper functions
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# alias do_sync='rsync -rltDh --delete --partial'
|
||||
# msg() {
|
||||
# >&2 printf '[*] %s ...\n' "$*"
|
||||
# }
|
||||
# warn() {
|
||||
# >&2 printf '\n\n<<<< WARNING: %s >>>>>\n\n' "$*"
|
||||
# }
|
||||
# die() {
|
||||
# msg "$*"
|
||||
# exit 1
|
||||
# }
|
||||
# debug() {
|
||||
# if [ "$DEBUG" ] ; then
|
||||
# >&2 printf ' DEBUG: %s\n' "$*"
|
||||
# fi
|
||||
# }
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Checks
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# check() {
|
||||
# mkdir -p "$DAYZ_FILES"
|
||||
|
||||
# if ! mount | grep -i "$DAYZ_FILES" >/dev/null ; then
|
||||
# msg "$DAYZ_FILES is not mounted!"
|
||||
# echo "hint: mount -t drvfs //truenas.home.weaver/dayz $DAYZ_FILES"
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# if [ ! -d "$MAIN" ] ; then
|
||||
# die "$MAIN does not exist"
|
||||
# fi
|
||||
|
||||
# if [ ! -d "$STOCK_SERVER_DATA" ] ; then
|
||||
# die "$STOCK_SERVER_DATA does not exist"
|
||||
# fi
|
||||
# }
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Environment Setup
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# init() {
|
||||
# mkdir -p "$SERVER_HOME" "$MOD_CACHE/$MAP_FOLDER_NAME"
|
||||
# :>"$SERVER_HOME/.modstring"
|
||||
# }
|
||||
|
||||
# setup_environment() {
|
||||
# msg "Copying stock server data"
|
||||
|
||||
# # list of all stock folders
|
||||
# for folder in addons battleye bliss docs dta keys ; do
|
||||
# do_sync "$STOCK_SERVER_DATA/$folder"/ "$SERVER_HOME/$folder" || die "Failed to copy stock: $folder"
|
||||
# done
|
||||
|
||||
# # list of all stock files
|
||||
# for file in ban.txt dayz.gproj dayzsetting.xml whitelist.txt \
|
||||
# DayZServer_x64.exe steam_api64.dll steamclient64.dll tier0_s64.dll vstdlib_s64.dll ; do
|
||||
# cp -f "$STOCK_SERVER_DATA/$file" "$SERVER_HOME/$file" || die "Failed to copy stock: $file"
|
||||
# done
|
||||
|
||||
# msg "Copying mod files"
|
||||
# do_sync "$DAYZ_FILES/mods/$MAP_FOLDER_NAME"/ "$MOD_CACHE/$MAP_FOLDER_NAME" || die "Failed to copy mod files"
|
||||
|
||||
# # msg "Copying DZSA executable"
|
||||
# # cp -f "$DAYZ_FILES/software/DZSALModServer.exe" "$SERVER_HOME/"
|
||||
# }
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Load Mods
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# load_mods() {
|
||||
# if [ ! -f "$MOD_CACHE/$MAP_FOLDER_NAME/mods.txt" ] ; then
|
||||
# die "mods.txt list missing"
|
||||
# fi
|
||||
|
||||
# mkdir -p "$SERVER_HOME/mods"
|
||||
|
||||
# _modstring=""
|
||||
# while read -r mod ; do
|
||||
# case $mod in
|
||||
# '@'*)
|
||||
# msg "- Found mod: $mod"
|
||||
# _modstring="$_modstring;mods/$mod"
|
||||
# do_sync "$MOD_CACHE/$MAP_FOLDER_NAME/$mod"/ "$SERVER_HOME/mods/$mod"
|
||||
|
||||
# for addon_folder in addons Addons addon Addon ; do
|
||||
# if [ -d "$SERVER_HOME/mods/$mod/$addon_folder" ] ; then
|
||||
# for addon in "$SERVER_HOME/mods/$mod/$addon_folder"/* ; do
|
||||
# if [ ! -f "$SERVER_HOME/addons/${addon##*/}" ] ; then
|
||||
# cp -f "$addon" "$SERVER_HOME/addons/"
|
||||
# fi
|
||||
# done
|
||||
# fi
|
||||
# done
|
||||
|
||||
# for key_folder in keys Keys key Key ; do
|
||||
# if [ -d "$SERVER_HOME/mods/$mod/$key_folder" ] ; then
|
||||
# for key in "$SERVER_HOME/mods/$mod/$key_folder"/* ; do
|
||||
# if [ ! -f "$SERVER_HOME/keys/${key##*/}" ] ; then
|
||||
# cp -f "$key" "$SERVER_HOME/keys/"
|
||||
# fi
|
||||
# done
|
||||
# fi
|
||||
# done
|
||||
# esac
|
||||
# done < "$MOD_CACHE/$MAP_FOLDER_NAME/mods.txt"
|
||||
|
||||
# # trim the initial leading ';'
|
||||
# _modstring=${_modstring#;}
|
||||
# printf '%s\n' "$_modstring" > .modstring
|
||||
# }
|
||||
|
||||
# # -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# # Load Map
|
||||
# # -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# load_stock_map_data() {
|
||||
# mkdir -p "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME"
|
||||
# do_sync --exclude='*storage_1*' \
|
||||
# "$DAYZ_FILES/stock/maps/$MAP_FOLDER_NAME"/ \
|
||||
# "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME" || \
|
||||
# die "Failed to copy stock map data"
|
||||
# }
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Types Patching
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
patch_types() {
|
||||
|
||||
if [ ! -f "$DAYZ_FILES/server_configs/types/default_types_to_delete.txt" ] ; then
|
||||
die "CANNOT REACH FILE: default_types_to_delete.txt"
|
||||
fi
|
||||
|
||||
# deletes
|
||||
while read -r line ; do
|
||||
case "$line" in
|
||||
'#'*|' '*|'')
|
||||
;;
|
||||
*)
|
||||
debug "TYPES -- deleting object: $line"
|
||||
xmlstarlet ed -L -P -d "//types/type[@name=\"$line\"]" \
|
||||
"$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/db/types.xml"
|
||||
esac
|
||||
done < "$DAYZ_FILES/server_configs/types/default_types_to_delete.txt"
|
||||
|
||||
# copy types edit tool
|
||||
if [ -f "$DAYZ_FILES/scripts/adjust_type.sh" ] ; then
|
||||
cp -f "$DAYZ_FILES/scripts/adjust_type.sh" "$SERVER_HOME"/
|
||||
else
|
||||
die "Could not find adjust_type.sh"
|
||||
fi
|
||||
|
||||
if [ -f "$DAYZ_FILES/server_configs/types/$MAP_FOLDER_NAME.sh" ] ; then
|
||||
cp -f "$DAYZ_FILES/server_configs/types/$MAP_FOLDER_NAME.sh" \
|
||||
"$SERVER_HOME"/
|
||||
|
||||
cd "$SERVER_HOME" || die "could not cd to $SERVER_HOME"
|
||||
|
||||
sh "$SERVER_HOME/$MAP_FOLDER_NAME.sh" \
|
||||
"$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/db/types.xml" || \
|
||||
die "Failed while running maps types edit script"
|
||||
else
|
||||
die "Could not find $DAYZ_FILES/server_configs/types/$MAP_FOLDER_NAME.sh"
|
||||
fi
|
||||
|
||||
# if we're on namalsk, we will have a types_dzn.xml as well
|
||||
# this file contains the frozen food etc unique namalsk items
|
||||
case $MAP_FOLDER_NAME in
|
||||
*namalsk*)
|
||||
DZN_FILE=namalsk_dzn.sh
|
||||
msg "Patching $DZN_FILE"
|
||||
if [ -f "$DAYZ_FILES/server_configs/types/$DZN_FILE" ] ; then
|
||||
cp -f "$DAYZ_FILES/server_configs/types/$DZN_FILE" \
|
||||
"$SERVER_HOME"/
|
||||
|
||||
cd "$SERVER_HOME" || die "could not cd to $SERVER_HOME"
|
||||
|
||||
sh "$SERVER_HOME/$DZN_FILE" \
|
||||
"$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/db/types_dzn.xml" || \
|
||||
die "Failed while running maps types edit script on types_dzn.xml"
|
||||
else
|
||||
die "Could not find $DAYZ_FILES/server_configs/types/$DZN_FILE"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
load_customtypes() {
|
||||
if [ -d "$DAYZ_FILES/server_configs/types/custom.$MAP_FOLDER_NAME" ] ; then
|
||||
CUSTOM_TYPES="$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/customtypes"
|
||||
CFG_ECORE="$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/cfgeconomycore.xml"
|
||||
|
||||
mkdir -p "$CUSTOM_TYPES"
|
||||
do_sync "$DAYZ_FILES/server_configs/types/custom.$MAP_FOLDER_NAME"/ \
|
||||
"$CUSTOM_TYPES"
|
||||
|
||||
for xml in "$CUSTOM_TYPES"/*.xml ; do
|
||||
debug " - Found custom type: ${xml##*/}"
|
||||
if [ -f "$xml" ] ; then
|
||||
sed -E -i '/<\/economycore>/d' "$CFG_ECORE"
|
||||
|
||||
printf '\n<ce folder="db">\n<file name="customtypes/%s" type="types" />\n</ce>\n\n' "${xml##*/}" \
|
||||
>> "$CFG_ECORE"
|
||||
|
||||
printf '%s\n' '</economycore>' >> "$CFG_ECORE"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# ============== custom SPAWNABLE types ===================
|
||||
if [ -d "$DAYZ_FILES/server_configs/types/spawnabletypes.$MAP_FOLDER_NAME" ] ; then
|
||||
msg "Copying custom spawnable types"
|
||||
|
||||
CUSTOM_SPAWNABLE_TYPES="$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/spawnabletypes"
|
||||
CFG_SPAWNABLE_TYPES="$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/cfgspawnabletypes.xml"
|
||||
|
||||
mkdir -p "$CUSTOM_SPAWNABLE_TYPES"
|
||||
do_sync "$DAYZ_FILES/server_configs/types/spawnabletypes.$MAP_FOLDER_NAME"/ \
|
||||
"$CUSTOM_SPAWNABLE_TYPES"
|
||||
|
||||
for xml in "$CUSTOM_SPAWNABLE_TYPES"/*.xml ; do
|
||||
debug " - Found custom spawnabletype: ${xml##*/}"
|
||||
if [ -f "$xml" ] ; then
|
||||
sed -E -i '/<\/spawnabletypes>/d' "$CFG_SPAWNABLE_TYPES"
|
||||
cat "$xml" >> "$CFG_SPAWNABLE_TYPES"
|
||||
printf '%s\n' '</spawnabletypes>' >> "$CFG_SPAWNABLE_TYPES"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Configs
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
load_configs() {
|
||||
msg "Loading server configs"
|
||||
|
||||
if [ -d "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME" ] ; then
|
||||
|
||||
for xml in "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME"/*.xml ; do
|
||||
if [ -f "$xml" ] ; then
|
||||
debug "Found: $xml -- Copying."
|
||||
do_sync "$xml" "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/${xml##*/}" || \
|
||||
die "Failed to copy: ${xml##*/}"
|
||||
fi
|
||||
done
|
||||
|
||||
for json in "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME"/*.json ; do
|
||||
if [ -f "$json" ] ; then
|
||||
debug "Found: $json -- Copying."
|
||||
do_sync "$json" "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/${json##*/}" || \
|
||||
die "Failed to copy: ${json##*/}"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/init.c" ] ; then
|
||||
debug "Found: init.c -- Copying."
|
||||
do_sync \
|
||||
"$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/init.c" \
|
||||
"$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/init.c" || \
|
||||
die "failed to copy init.c"
|
||||
fi
|
||||
|
||||
if [ -f "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/areaflags.map" ] ; then
|
||||
debug "Found: areaflags.map -- Copying."
|
||||
do_sync \
|
||||
"$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/areaflags.map" \
|
||||
"$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/areaflags.map" || \
|
||||
die "failed to copy areaflags.map"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ -d "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/db" ] ; then
|
||||
for xml in "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/db"/*.xml ; do
|
||||
if [ -f "$xml" ] ; then
|
||||
debug "Found: $xml -- Copying."
|
||||
do_sync "$xml" "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/db/${xml##*/}" || \
|
||||
die "Failed to copy: ${xml##*/}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -d "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/env" ] ; then
|
||||
for xml in "$DAYZ_FILES/server_configs/mpmissions/$MAP_FOLDER_NAME/env"/*.xml ; do
|
||||
if [ -f "$xml" ] ; then
|
||||
debug "Found: $xml -- Copying."
|
||||
do_sync "$xml" "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME/env/${xml##*/}" || \
|
||||
die "Failed to copy: ${xml##*/}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
msg "Copying generic Profilesfolder configs"
|
||||
if [ -d "$DAYZ_FILES/server_configs/Profilesfolder/sUDE/config" ] ; then
|
||||
mkdir -p "$SERVER_HOME/Profilesfolder/sUDE/config"
|
||||
cp -f "$DAYZ_FILES/server_configs/Profilesfolder/sUDE/config"/* "$SERVER_HOME/Profilesfolder/sUDE/config"/
|
||||
else
|
||||
die "missing: $DAYZ_FILES/server_configs/Profilesfolder/sUDE/config"
|
||||
fi
|
||||
}
|
||||
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
# Main
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
main() {
|
||||
# init
|
||||
# cd "$SERVER_HOME" || die "Could not cd to '$SERVER_HOME'"
|
||||
|
||||
# check || die "Failed check"
|
||||
|
||||
# msg "Setting up environment"
|
||||
# setup_environment || die "Could not set up environment."
|
||||
|
||||
# msg "Loading mods"
|
||||
# load_mods || die "Could not load mods"
|
||||
# mod_string=$(cat .modstring)
|
||||
|
||||
# msg "Loading stock map data"
|
||||
# load_stock_map_data || die "Could not load map"
|
||||
|
||||
msg "Patching types.xml"
|
||||
patch_types || die "Failed to patch types"
|
||||
|
||||
msg "Copying server configs"
|
||||
load_configs || die "Failed to load configs"
|
||||
|
||||
msg "Creating custom types list"
|
||||
load_customtypes || die "Failed to load custom types"
|
||||
|
||||
# creating temp.bat here to avoid the arg max char limit of windows cmd.exe
|
||||
cat > temp.bat <<EOF
|
||||
:start
|
||||
start "DayZ Server" /min DZSALModServer.exe -config=serverDZ.cfg -port="$SERVER_PORT" -profiles=Profilesfolder -mod="$mod_string" -cpuCount="$SERVER_CPU" -dologs -adminlog -netlog -freezecheck
|
||||
EOF
|
||||
|
||||
# start the server
|
||||
cmd.exe /C temp.bat
|
||||
|
||||
echo '===================================='
|
||||
printf '%s - Server started.\n' "$(date)"
|
||||
echo '===================================='
|
||||
|
||||
printf '\n**** Sleeping for: %s *****\n\n' "$RESTART_INTERVAL"
|
||||
|
||||
count=0
|
||||
while [ "$count" -lt "$RESTART_INTERVAL" ] ; do
|
||||
sleep 60
|
||||
count=$((count + 60))
|
||||
msg "TIME LEFT BEFORE RESTART: $(( (RESTART_INTERVAL - count) / 60 )) minutes"
|
||||
done
|
||||
|
||||
echo "==========================="
|
||||
|
||||
msg "Time up"
|
||||
msg "Killing server"
|
||||
cmd.exe /C taskkill /im DayZServer_x64.exe /F
|
||||
rm -f temp.bat 2>/dev/null ||:
|
||||
|
||||
msg "Sleeping 10 seconds to settle"
|
||||
sleep 10
|
||||
msg "SERVER IS RESTARTING"
|
||||
}
|
||||
|
||||
# while msg 'Starting loop' ; do
|
||||
# cd "$ORIGINAL_DIR" || die "Can no longer cd to $ORIGINAL_DIR"
|
||||
|
||||
# if [ -e ./SERVER.ENV ] ; then
|
||||
# . ./SERVER.ENV
|
||||
# else
|
||||
# die "Could not source ./SERVER.ENV"
|
||||
# fi
|
||||
|
||||
# if [ -f ./serverDZ.cfg ] ; then
|
||||
# cp -f ./serverDZ.cfg "$SERVER_HOME"/
|
||||
# else
|
||||
# die "Could not find ./serverDZ.cfg"
|
||||
# fi
|
||||
|
||||
# main "$@"
|
||||
# done
|
||||
|
||||
112
adjust_type.sh
112
adjust_type.sh
@@ -1,112 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Wrapper for editing DayZ types.xml using xmlstarlet
|
||||
#
|
||||
#----------------------------------------------------------
|
||||
|
||||
# example: swap_flag M16A2 count_in_cargo 1 file
|
||||
swap_flag() {
|
||||
file=$4
|
||||
|
||||
if ! command -v xmlstarlet >/dev/null ; then
|
||||
>&2 echo "NOT IN \$PATH: xmlstarlet"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$file" ] ; then
|
||||
>&2 echo "File: '$file' is not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" ] && [ "$2" ] && [ "$3" ] ; then
|
||||
_name=$1
|
||||
_flag=$2
|
||||
_value=$3
|
||||
xmlstarlet ed -P -L \
|
||||
-u \ "//types/type[@name=\"$_name\"]/flags[@$_flag]/@$_flag" \
|
||||
-v \
|
||||
"$_value" \
|
||||
"$file"
|
||||
else
|
||||
>&2 echo "Bad params in swap_flag"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# example: swap_value M4A1 nominal 3 file
|
||||
swap_value() {
|
||||
file=$4
|
||||
|
||||
if ! command -v xmlstarlet >/dev/null ; then
|
||||
>&2 echo "NOT IN \$PATH: xmlstarlet"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$file" ] ; then
|
||||
>&2 echo "File: '$file' is not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" ] && [ "$2" ] && [ "$3" ] ; then
|
||||
_name=$1
|
||||
_tag=$2
|
||||
_value=$3
|
||||
xmlstarlet ed -P -L \
|
||||
-u \ "//types/type[@name=\"$_name\"]/$_tag" \
|
||||
-v \
|
||||
"$_value" \
|
||||
"$file"
|
||||
else
|
||||
>&2 echo "Bad params in swap_value"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: ${0##*/} [-f|-v] name tag value file
|
||||
|
||||
-f swap a flag from flags
|
||||
-v swap a normal value
|
||||
|
||||
# --------------------------------
|
||||
# Examples
|
||||
# --------------------------------
|
||||
|
||||
# examples #1:
|
||||
|
||||
<type name="M16A2">
|
||||
<lifetime>28800</lifetime>
|
||||
</type>
|
||||
|
||||
${0##*/} -v M16A2 lifetime 20000 some_file.xml
|
||||
|
||||
# example #2:
|
||||
|
||||
<type name="M16A2">
|
||||
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
|
||||
</type>
|
||||
|
||||
${0##*/} -f M16A2 count_in_player 1 some_file.xml
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$DEBUG" ] ; then
|
||||
echo "ADJUSTING TYPE: $2 $3"
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
-f)
|
||||
shift
|
||||
swap_flag "$1" "$2" "$3" "$4" || exit 1
|
||||
;;
|
||||
-v)
|
||||
shift
|
||||
swap_value "$1" "$2" "$3" "$4" || exit 1
|
||||
;;
|
||||
esac
|
||||
19
archive/discord/bots/num1/Config.json
Normal file
19
archive/discord/bots/num1/Config.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"UpdateTime": 30,
|
||||
"ServerInformation": [
|
||||
{
|
||||
"Name": "ZyaD Server Status",
|
||||
"Address": "72.213.191.131:2305",
|
||||
"Token": "MTA0ODc5MDAzNTM3NTMyOTM3MA.GlobiD.MDkpw9ySx15KiQkudeUPkA2FGAmIltIv9gi9H4",
|
||||
"Status": 1,
|
||||
"UseNameAsLabel": false,
|
||||
"ProviderType": 0,
|
||||
"ChannelID": null,
|
||||
"StatusFormat": "Chernaurus: @Players/@MaxPlayers"
|
||||
}
|
||||
],
|
||||
"ApplicationTokens": {
|
||||
"SteamAPIKey": "21269ABF5364A400A6367F32109EC651",
|
||||
"BattleMetricsKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6ImMyMTJhMTk0MDcyMjYzOGYiLCJpYXQiOjE2Njc5Njg3MTAsIm5iZiI6MTY2Nzk2ODcxMCwiaXNzIjoiaHR0cHM6Ly93d3cuYmF0dGxlbWV0cmljcy5jb20iLCJzdWIiOiJ1cm46dXNlcjo2MjY3MTAifQ.n8lc4qGwO2SYXvX50l2kbCHgi4dppW9P9G8sG2UB690"
|
||||
}
|
||||
}
|
||||
BIN
archive/discord/bots/num1/DiscordPlayerCountBot.exe
Normal file
BIN
archive/discord/bots/num1/DiscordPlayerCountBot.exe
Normal file
Binary file not shown.
45
archive/discord/bots/num1/log4net.config
Normal file
45
archive/discord/bots/num1/log4net.config
Normal file
@@ -0,0 +1,45 @@
|
||||
<log4net>
|
||||
<root>
|
||||
<level value="ALL" />
|
||||
<appender-ref ref="console" />
|
||||
<appender-ref ref="file" />
|
||||
</root>
|
||||
|
||||
<!--File Appender-->
|
||||
<appender name="file" type="log4net.Appender.RollingFileAppender">
|
||||
<threshold value="ERROR"/>
|
||||
<file value="warnings_and_errors.log" />
|
||||
<appendToFile value="true" />
|
||||
<rollingStyle value="Size" />
|
||||
<maxSizeRollBackups value="5" />
|
||||
<maximumFileSize value="25MB" />
|
||||
<staticLogFileName value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date %level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!--Console appender-->
|
||||
<appender name="console" type="log4net.Appender.ManagedColoredConsoleAppender">
|
||||
<threshold value="INFO"/>
|
||||
<mapping>
|
||||
<level value="INFO" />
|
||||
<forecolor value="Green" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="WARN" />
|
||||
<forecolor value="Yellow" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="ERROR" />
|
||||
<forecolor value="Red" />
|
||||
</mapping>
|
||||
<mapping>
|
||||
<level value="DEBUG" />
|
||||
<forecolor value="Blue" />
|
||||
</mapping>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionpattern value="%date %-5level - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
</log4net>
|
||||
1
archive/discord/bots/num1/warnings_and_errors.log
Normal file
1
archive/discord/bots/num1/warnings_and_errors.log
Normal file
@@ -0,0 +1 @@
|
||||
2022-12-03 22:12:29,734 ERROR PlayerCountBot.Providers.SteamProvider - [Steam] - 21cbba8c-0f4c-46f4-8ce0-52c27a808b8a - Server Address: 72.213.191.131:2305 was not found in Steam's directory.
|
||||
11
archive/discord/discord_bot_info.txt
Normal file
11
archive/discord/discord_bot_info.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
app id:
|
||||
1048790035375329370
|
||||
|
||||
pub key:
|
||||
15a2d69333ab4d3c7fe52cefce65a86fbfd607a0c39a23a85958b5b1529bd5d6
|
||||
|
||||
permission integer:
|
||||
829531688784
|
||||
|
||||
token:
|
||||
MTA0ODc5MDAzNTM3NTMyOTM3MA.GlobiD.MDkpw9ySx15KiQkudeUPkA2FGAmIltIv9gi9H4
|
||||
BIN
archive/discord/logo.png
Normal file
BIN
archive/discord/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
1
archive/discord/vc1-id.txt
Normal file
1
archive/discord/vc1-id.txt
Normal file
@@ -0,0 +1 @@
|
||||
1048793047376351282
|
||||
168
lib/globals.sh
Normal file
168
lib/globals.sh
Normal file
@@ -0,0 +1,168 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# values used on both the modserver and individual servers
|
||||
# ------------------------------------------------------------
|
||||
|
||||
################### GLOBAL VARS ##############################
|
||||
export DAYZ_GAME_ID=221100
|
||||
export DAYZ_SERVER_ID=223350
|
||||
export STEAM_USER="yzaddayz"
|
||||
|
||||
# blank debug to unset it by default
|
||||
export DEBUG=
|
||||
|
||||
export REMOTE_DAYZ_TRUENAS_SHARE='\\dayz-truenas.local.wvr.sh\dayz'
|
||||
export REMOTE_DIR="/mnt/dayz"
|
||||
export REMOTE_SERVER_LOCKFILE="$REMOTE_DIR/lockfile"
|
||||
export REMOTE_MAPS="$REMOTE_DIR/stock/maps"
|
||||
export REMOTE_MODS="$REMOTE_DIR/mods"
|
||||
|
||||
export REMOTE_STOCK_SERVER="$REMOTE_DIR/stock/DayZServer"
|
||||
export REMOTE_STOCK_GAME="$REMOTE_DIR/stock/DayZ"
|
||||
|
||||
export CHERNARUS_MAP_NAME=dayzOffline.chernarusplus
|
||||
export NAMALSK_MAP_NAME=regular.namalsk
|
||||
export TAKISTAN_MAP_NAME=Offline.TakistanPlus
|
||||
|
||||
|
||||
# NAMALSK_SURVIVAL is what the terrain/map comes with
|
||||
export NAMALSK_SURVIVAL_MOD_ID=2289461232
|
||||
export NAMALSK_ISLAND_MOD_ID=2289456201
|
||||
export TAKISTAN_MOD_ID=2563233742
|
||||
|
||||
################### GLOBAL VARS ##############################
|
||||
|
||||
################### GLOBAL ALIASES ###########################
|
||||
unalias rsync 2>/dev/null ||:
|
||||
alias do_sync='rsync -avhu --progress --delete --partial --links'
|
||||
################### GLOBAL ALIASES ###########################
|
||||
|
||||
################### GLOBAL FUNCTIONS #########################
|
||||
msg() {
|
||||
printf '>>>>>[MESSAGE]: %s\n' "$*"
|
||||
}
|
||||
errmsg() {
|
||||
>&2 printf '>>>>>>[ERROR]: %s\n' "$*"
|
||||
}
|
||||
die() {
|
||||
errmsg "$*"
|
||||
exit 1
|
||||
}
|
||||
debug() {
|
||||
if [ "$DEBUG" ] ; then
|
||||
>&2 printf '>>>>>>DEBUG: %s\n' "$*"
|
||||
fi
|
||||
}
|
||||
isempty() {
|
||||
for arg in "$@" ; do
|
||||
# exit in error if file
|
||||
if [ -f "$arg" ] ; then
|
||||
exit 1
|
||||
elif [ -L "$arg" ] ; then
|
||||
# if is a symlink, check what it points to
|
||||
# note: this only checks one-link level deep
|
||||
if [ -d "$(readlink "$arg")" ] ; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
elif [ -d "$arg" ] ; then
|
||||
:
|
||||
else
|
||||
# is not a directory or a link to a directory
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# there should be a way to make this be builtins only
|
||||
# using printf and glob expansions, look into later
|
||||
if /bin/rmdir "$arg" 2>/dev/null ; then
|
||||
/bin/mkdir -p "$arg"
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
mount_dayz_network_drive() {
|
||||
if ! is_network_drive_mounted ; then
|
||||
if [ ! -d /mnt/dayz ] ; then
|
||||
sudo mkdir -p /mnt/dayz
|
||||
fi
|
||||
if [ -e /proc/version ] ; then
|
||||
read -r ver < /proc/version
|
||||
case $ver in
|
||||
# WSL
|
||||
*icrosoft*)
|
||||
msg "Detected WSL, mounting via drvfs"
|
||||
sudo mount -t drvfs -o user=samba \
|
||||
"$REMOTE_DAYZ_TRUENAS_SHARE" /mnt/dayz
|
||||
;;
|
||||
*)
|
||||
msg "Detected Linux, mounting via cifs"
|
||||
# shellcheck disable=2046
|
||||
sudo mount -t cifs "$REMOTE_DAYZ_TRUENAS_SHARE" /mnt/dayz \
|
||||
-o rw \
|
||||
-o credentials=/root/sambacreds.txt \
|
||||
-o iocharset=utf8 \
|
||||
-o vers=3.0 \
|
||||
-o uid=$(id -u) \
|
||||
-o gid=$(id -g)
|
||||
esac
|
||||
|
||||
unset ver
|
||||
else
|
||||
errmsg 'could not find /proc/version'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
if ! is_network_drive_mounted ; then
|
||||
errmsg 'Could not mount network drive'
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
is_network_drive_mounted() {
|
||||
if [ ! -f "$REMOTE_DIR/canary" ] ; then
|
||||
return 1
|
||||
fi
|
||||
# test write
|
||||
touch /mnt/dayz/canary.test
|
||||
if [ $? -eq 0 ] ; then
|
||||
rm /mnt/dayz/canary.test
|
||||
else
|
||||
errmsg "Mounted network drive but we do not have write access."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
# =====================================================================================
|
||||
islocked_remote_server() {
|
||||
if [ -e "$REMOTE_SERVER_LOCKFILE" ] ; then
|
||||
# msg "Server is not currently locked!"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
lock_remote_server() {
|
||||
msg "Locking remote server."
|
||||
if ! echo 'locked' | tee "$REMOTE_SERVER_LOCKFILE" ; then
|
||||
die "Could not create: $REMOTE_SERVER_LOCKFILE"
|
||||
fi
|
||||
}
|
||||
unlock_remote_server() {
|
||||
msg "Unlocking remote server."
|
||||
rm -f "$REMOTE_SERVER_LOCKFILE" || die "Could not remove: $REMOTE_SERVER_LOCKFILE"
|
||||
}
|
||||
wait_until_remote_server_unlocked() {
|
||||
# wait until dayz-modserver lockfile is released on the NAS
|
||||
if islocked_remote_server ; then
|
||||
msg "Remote file server is currently locked"
|
||||
msg "Sleeping until is no longer locked..."
|
||||
while islocked_remote_server ; do
|
||||
echo "Sleeping..."
|
||||
sleep 10
|
||||
done
|
||||
msg "Server unlocked! Continuing..."
|
||||
fi
|
||||
}
|
||||
# =====================================================================================
|
||||
145
lib/typestool.sh
Normal file
145
lib/typestool.sh
Normal file
@@ -0,0 +1,145 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Wrapper for editing DayZ types.xml using xmlstarlet
|
||||
#
|
||||
# 01. "should check code directly not $?"
|
||||
# shellcheck disable=2181
|
||||
#
|
||||
# 02. "can't follow . import"
|
||||
# shellcheck disable=1090,1091
|
||||
#
|
||||
# 03. "possible misspelling"
|
||||
# shellcheck disable=2153
|
||||
#
|
||||
# 04. "use find .. over ls"
|
||||
# shellcheck disable=2011
|
||||
#----------------------------------------------------------
|
||||
|
||||
# =================================================================
|
||||
# LOAD GLOBALS FILE
|
||||
# =================================================================
|
||||
GLOBALS_FILE="$PWD/globals.sh"
|
||||
if [ -e "$GLOBALS_FILE" ] ; then
|
||||
chmod +x "$GLOBALS_FILE"
|
||||
. "$GLOBALS_FILE"
|
||||
else
|
||||
>&2 echo "Could not load: $GLOBALS_FILE"
|
||||
exit 1
|
||||
fi
|
||||
# =================================================================
|
||||
|
||||
# example: swap_flag M16A2 count_in_cargo 1 file
|
||||
swap_flags() {
|
||||
file=$4
|
||||
|
||||
if [ ! -f "$file" ] ; then
|
||||
>&2 echo "File: '$file' is not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" ] && [ "$2" ] && [ "$3" ] ; then
|
||||
_name=$1
|
||||
_flag=$2
|
||||
_value=$3
|
||||
xmlstarlet ed -P -L \
|
||||
-u \ "//types/type[@name=\"$_name\"]/flags[@$_flag]/@$_flag" \
|
||||
-v \
|
||||
"$_value" \
|
||||
"$file"
|
||||
else
|
||||
>&2 echo "Bad params in swap_flag"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# example: swap_value M4A1 nominal 3 file
|
||||
swap_value() {
|
||||
file=$4
|
||||
|
||||
if [ ! -f "$file" ] ; then
|
||||
>&2 echo "File: '$file' is not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" ] && [ "$2" ] && [ "$3" ] ; then
|
||||
_name=$1
|
||||
_tag=$2
|
||||
_value=$3
|
||||
xmlstarlet ed -P -L \
|
||||
-u \ "//types/type[@name=\"$_name\"]/$_tag" \
|
||||
-v \
|
||||
"$_value" \
|
||||
"$file"
|
||||
else
|
||||
>&2 echo "Bad params in swap_value"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: ${0##*/} [--swap-flags|--swap-value] item_name tag value types.xml
|
||||
|
||||
--swap-value swap an item tag's value
|
||||
--swap-flags swap an item's flags sub-value
|
||||
|
||||
|
||||
|
||||
# ================================
|
||||
# Examples
|
||||
# ================================
|
||||
|
||||
# --------------------------------
|
||||
# Ex #1: Swapping a value
|
||||
# --------------------------------
|
||||
|
||||
<type name="M4A1">
|
||||
<nominal>1</nominal>
|
||||
</type>
|
||||
|
||||
${0##*/} --swap-value M4A1 nominal 2 some_file.xml
|
||||
|
||||
# --------------------------------
|
||||
# Ex #2: Swapping a flags value
|
||||
# --------------------------------
|
||||
|
||||
<type name="M16A2">
|
||||
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
|
||||
</type>
|
||||
|
||||
${0##*/} --swap-flags M16A2 count_in_player 1 some_file.xml
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
check() {
|
||||
if ! command -v xmlstarlet >/dev/null ; then
|
||||
die "Please install xmlstarlet"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
check || die "Failed check"
|
||||
|
||||
if [ "$DEBUG" ] ; then
|
||||
echo "ADJUSTING TYPE: $2 $3"
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
-v|--swap-value)
|
||||
shift
|
||||
swap_value "$1" "$2" "$3" "$4" || exit 1
|
||||
;;
|
||||
-f|--swap-flags)
|
||||
shift
|
||||
swap_flags "$1" "$2" "$3" "$4" || exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
14
lib/webhook.sh
Normal file
14
lib/webhook.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
webhook_url="https://discord.com/api/webhooks/1176483934008262749/F2fav42fOyucZcgf-0z9o7iY9AkCPCNBfhazdeUU-9Ycc7jnhO7l12xS-F7idbK60xtz"
|
||||
|
||||
msg() {
|
||||
message="$(printf '%s' "$*" | jq -Rsa .)"
|
||||
|
||||
curl -s \
|
||||
-X POST "$webhook_url" \
|
||||
-H "Content-Type:application/json" \
|
||||
--data "{\"content\": $message}"
|
||||
}
|
||||
|
||||
msg "$@"
|
||||
2
modlists/Offline.TakistanPlus.txt
Normal file
2
modlists/Offline.TakistanPlus.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# Takistan Map
|
||||
2563233742^takistan
|
||||
@@ -1,3 +1,111 @@
|
||||
# ==================================================================
|
||||
# Generic / All Servers
|
||||
# ==================================================================
|
||||
|
||||
# Dabs Framework
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2545327648
|
||||
2545327648^dabsframework
|
||||
|
||||
# CF
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1559212036
|
||||
1559212036^cf
|
||||
|
||||
# VPP Admin Tools
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1828439124
|
||||
############################ 1828439124^vppadmintools
|
||||
|
||||
# Ear Plugs
|
||||
# https://steamcommunity.com/workshop/filedetails/?id=1819514788
|
||||
############################ 1819514788^earplugs
|
||||
|
||||
# health regen 2x when blood is full
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2434838000&searchtext=health
|
||||
############################ 2434838000^healthregen
|
||||
|
||||
# tent backpacks
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2884638645
|
||||
############################ 2884638645^tentbackpacks
|
||||
|
||||
# durable suppressors (1.5x health)
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2880585815
|
||||
############################ 2880585815^durablesuppressors
|
||||
|
||||
# Zen's Cause of Death
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2810260908
|
||||
############################ 2810260908^causeofdeath
|
||||
|
||||
# Bear Buff (bears aggro from further away, chase players)
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2692521272
|
||||
############################ 2692521272^bearbuff
|
||||
|
||||
# Custom Animations
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2545980712
|
||||
############################ 2545980712^customanimations
|
||||
|
||||
# Worn Repair
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2581770969
|
||||
############################ 2581770969^wornrepair
|
||||
|
||||
# No DepthOfField
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1721317955
|
||||
############################ 1721317955^nodof
|
||||
|
||||
# Zen's Fire Fuel
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2866862200
|
||||
############################ 2866862200^firefuel
|
||||
|
||||
# Zen's Gun Move Sounds
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2832627966
|
||||
############################ 2832627966^gunmovesounds
|
||||
|
||||
# Bad Food
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2155069271
|
||||
############################ 2155069271^badfood
|
||||
|
||||
# ==================================================================
|
||||
# sUDE
|
||||
# ==================================================================
|
||||
|
||||
# sFramework
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2614334381
|
||||
############################ 2614334381^sframework
|
||||
|
||||
# sVisual
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2469448088
|
||||
############################ 2469448088^svisual
|
||||
|
||||
# ==================================================================
|
||||
# Chernarus Specific
|
||||
# ==================================================================
|
||||
|
||||
# spurgles bagz
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2489196158
|
||||
############################ 2489196158^spurglesbagz
|
||||
|
||||
# fliptransport
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1832448183
|
||||
############################ 1832448183^fliptransport
|
||||
|
||||
# no weapon raise
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2098390861
|
||||
############################ 2098390861^noweaponraise
|
||||
|
||||
# no vehicle damage
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1735947752
|
||||
############################ 1735947752^novehicledamage
|
||||
|
||||
# Doc's Car Fixes
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2886222035
|
||||
############################ 2886222035^docscarfixes
|
||||
|
||||
# Lag's Lighting Overhaul
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2873016243
|
||||
############################ 2873016243^ladslightingoverhaul
|
||||
|
||||
# Uncuepa's Civilian Clothing
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1762444175
|
||||
############################ 1762444175^uncuepascivilianclothing
|
||||
|
||||
# ==================================================================
|
||||
# Inactive
|
||||
# ==================================================================
|
||||
@@ -22,115 +130,8 @@
|
||||
################## https://steamcommunity.com/sharedfiles/filedetails/?id=2337398072
|
||||
#################2337398072^enoughstamina
|
||||
|
||||
# ==================================================================
|
||||
# Generic / All Servers
|
||||
# ==================================================================
|
||||
#################### Notes
|
||||
#################### https://steamcommunity.com/sharedfiles/filedetails/?id=1999076953
|
||||
###################1999076953^notes
|
||||
|
||||
# Dabs Framework
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2545327648
|
||||
2545327648^dabsframework
|
||||
|
||||
# CF
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1559212036
|
||||
1559212036^cf
|
||||
|
||||
# VPP Admin Tools
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1828439124
|
||||
1828439124^vppadmintools
|
||||
|
||||
# Notes
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1999076953
|
||||
1999076953^notes
|
||||
|
||||
# Ear Plugs
|
||||
# https://steamcommunity.com/workshop/filedetails/?id=1819514788
|
||||
1819514788^earplugs
|
||||
|
||||
# health regen 2x when blood is full
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2434838000&searchtext=health
|
||||
2434838000^healthregen
|
||||
|
||||
# tent backpacks
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2884638645
|
||||
2884638645^tentbackpacks
|
||||
|
||||
# durable suppressors (1.5x health)
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2880585815
|
||||
2880585815^durablesuppressors
|
||||
|
||||
# Zen's Cause of Death
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2810260908
|
||||
2810260908^causeofdeath
|
||||
|
||||
# Bear Buff (bears aggro from further away, chase players)
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2692521272
|
||||
2692521272^bearbuff
|
||||
|
||||
# Custom Animations
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2545980712
|
||||
2545980712^customanimations
|
||||
|
||||
# Worn Repair
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2581770969
|
||||
2581770969^wornrepair
|
||||
|
||||
# No DepthOfField
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1721317955
|
||||
1721317955^nodof
|
||||
|
||||
# Zen's Fire Fuel
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2866862200
|
||||
2866862200^firefuel
|
||||
|
||||
# Zen's Gun Move Sounds
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2832627966
|
||||
2832627966^gunmovesounds
|
||||
|
||||
# Bad Food
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2155069271
|
||||
2155069271^badfood
|
||||
|
||||
# ==================================================================
|
||||
# sUDE
|
||||
# ==================================================================
|
||||
|
||||
# sFramework
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2614334381
|
||||
2614334381^sframework
|
||||
|
||||
# sVisual
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2469448088
|
||||
2469448088^svisual
|
||||
|
||||
# ==================================================================
|
||||
# Chernarus Specific
|
||||
# ==================================================================
|
||||
|
||||
# spurgles bagz
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2489196158
|
||||
2489196158^spurglesbagz
|
||||
|
||||
# fliptransport
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1832448183
|
||||
1832448183^fliptransport
|
||||
|
||||
# no weapon raise
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2098390861
|
||||
2098390861^noweaponraise
|
||||
|
||||
# no vehicle damage
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1735947752
|
||||
1735947752^novehicledamage
|
||||
|
||||
# Doc's Car Fixes
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2886222035
|
||||
2886222035^docscarfixes
|
||||
|
||||
# Lag's Lighting Overhaul
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2873016243
|
||||
2873016243^ladslightingoverhaul
|
||||
|
||||
# Uncuepa's Civilian Clothing
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=1762444175
|
||||
1762444175^uncuepascivilianclothing
|
||||
|
||||
39
modlists/regular.namalsk.txt
Normal file
39
modlists/regular.namalsk.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
# Namalsk Survival
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2289461232
|
||||
2289461232^namalsksurvival
|
||||
|
||||
# Namalsk Island
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2289456201
|
||||
2289456201^namalskisland
|
||||
|
||||
#@dabsframework
|
||||
#@cf
|
||||
#@vppadmintools
|
||||
#@notes
|
||||
#@earplugs
|
||||
#@healthregen
|
||||
#@tentbackpacks
|
||||
#@durablesuppressors
|
||||
#@causeofdeath
|
||||
#@bearbuff
|
||||
#@customanimations
|
||||
#@wornrepair
|
||||
#@nodof
|
||||
#@firefuel
|
||||
#@gunmovesounds
|
||||
#@badfood
|
||||
#@noweaponraise
|
||||
#@docscarfixes
|
||||
#@novehicledamage
|
||||
#@fliptransport
|
||||
#@spurglesbagz
|
||||
#@sframework
|
||||
#@svisual
|
||||
#@skyz
|
||||
#@namalskisland
|
||||
#@namalsksurvival
|
||||
#@svisualnamalsk
|
||||
#@gaussrifle
|
||||
#@namalskigloo
|
||||
#@frozencorpses
|
||||
#@polarbarrenamefix
|
||||
@@ -1,125 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAYZ_GAME_ID=221100
|
||||
DAYZ_SERVER_ID=223350
|
||||
LOCAL_MODS_DIR="${HOME}/.steam/debian-installation/steamapps/workshop/content/$DAYZ_GAME_ID"
|
||||
STEAM_USER="yzaddayz"
|
||||
REMOTE_MAPS="/mnt/dayz/stock/maps"
|
||||
|
||||
alias do_sync='rsync -rvltDhu --delete --partial --progress'
|
||||
|
||||
msg() {
|
||||
printf '[*] %s\n' "$*"
|
||||
}
|
||||
|
||||
# ====================================================================================
|
||||
|
||||
update_server() {
|
||||
msg "------------------ UPDATING DAYZ SERVER -------------------"
|
||||
|
||||
LOCAL_INSTALL_DIR="${HOME}/.steam/debian-installation/steamapps/common/DayZServer"
|
||||
REMOTE_INSTALL_DIR="/mnt/dayz/stock/DayZServer"
|
||||
|
||||
steamcmd -tcp +login "$STEAM_USER" +app_update "$DAYZ_GAME_ID" +quit
|
||||
steamcmd -tcp +login "$STEAM_USER" +app_update "$DAYZ_SERVER_ID" +quit
|
||||
|
||||
do_sync "$LOCAL_INSTALL_DIR"/ "$REMOTE_INSTALL_DIR"
|
||||
msg "------- DONE UPDATING SERVER ---------------------"
|
||||
}
|
||||
|
||||
# args: $1=server_name
|
||||
update_mods() {
|
||||
MODS_FILE="$HOME/modlists/$1.txt"
|
||||
REMOTE_MODS_DIR="/mnt/dayz/mods/$1"
|
||||
mkdir -p "$REMOTE_MODS_DIR"
|
||||
|
||||
tempfile=/tmp/mods-to-download.txt
|
||||
:> "$tempfile"
|
||||
|
||||
while read -r mod ; do
|
||||
# skip comments, blank lines
|
||||
case "$mod" in
|
||||
\#*|'')
|
||||
;;
|
||||
*)
|
||||
mod=${mod%%^*}
|
||||
printf "+workshop_download_item $DAYZ_GAME_ID %s\n" "$mod" >> "$tempfile"
|
||||
mkdir -p "$LOCAL_MODS_DIR/$mod"
|
||||
esac
|
||||
done < "$MODS_FILE"
|
||||
|
||||
msg "----------- DOWNLOAD MODS -------------"
|
||||
steamcmd -tcp +login "$STEAM_USER" $(cat "$tempfile" | xargs) +quit || exit 1
|
||||
|
||||
msg "----------- RENAMING MODS -------------"
|
||||
|
||||
rm -rf "$HOME/mods_to_copy" 2>/dev/null ||:
|
||||
mkdir -p "$HOME/mods_to_copy"
|
||||
|
||||
:> "$HOME/mods_to_copy/mods.txt"
|
||||
while read -r mod ; do
|
||||
# skip comments, blank lines
|
||||
case "$mod" in
|
||||
\#*|'')
|
||||
;;
|
||||
*)
|
||||
mod_id=${mod%%^*}
|
||||
mod_name=${mod##*^}
|
||||
do_sync "$LOCAL_MODS_DIR/$mod_id"/ "$HOME/mods_to_copy/@${mod_name}"
|
||||
printf '@%s\n' "$mod_name" >> "$HOME/mods_to_copy/mods.txt"
|
||||
esac
|
||||
done < "$MODS_FILE"
|
||||
|
||||
msg "----------- SYNCING MODS -------------"
|
||||
do_sync "$HOME/mods_to_copy"/ "$REMOTE_MODS_DIR"
|
||||
|
||||
rm "$tempfile" 2>/dev/null ||:
|
||||
rm -rf "$HOME/mods_to_copy" 2>/dev/null ||:
|
||||
}
|
||||
|
||||
update_stock_maps() {
|
||||
msg "----------- UPDATING MAPS -------------"
|
||||
cherno=dayzOffline.chernarusplus
|
||||
namalsk=regular.namalsk
|
||||
takistan=Offline.TakistanPlus
|
||||
NAMALSK_MOD_ID=2289461232
|
||||
TAKISTAN_MOD_ID=2563233742
|
||||
|
||||
do_sync \
|
||||
"${HOME}/.steam/debian-installation/steamapps/common/DayZServer/mpmissions/$cherno"/ \
|
||||
"$REMOTE_MAPS/$cherno"
|
||||
|
||||
msg "Updating Namalsk Survival"
|
||||
steamcmd -tcp +login "$STEAM_USER" +workshop_download_item "$DAYZ_GAME_ID" "$NAMALSK_MOD_ID" +quit || exit 1
|
||||
if [ -d "$LOCAL_MODS_DIR/$NAMALSK_MOD_ID/Extras/Regular/$namalsk" ] ; then
|
||||
do_sync "$LOCAL_MODS_DIR/$NAMALSK_MOD_ID/Extras/Regular/$namalsk"/ "$REMOTE_MAPS/$namalsk" || \
|
||||
die "failed to copy Namalsk map files"
|
||||
fi
|
||||
|
||||
msg "Updating Optimized Namalsk Server PBOs"
|
||||
#NAMALSK_OPTIMIZED
|
||||
steamcmd -tcp +login "$STEAM_USER" +workshop_download_item "$DAYZ_GAME_ID" "$NAMALSK_MOD_ID" +quit || exit 1
|
||||
|
||||
msg "Updating TakistanPlus"
|
||||
steamcmd -tcp +login "$STEAM_USER" +workshop_download_item "$DAYZ_GAME_ID" "$TAKISTAN_MOD_ID" +quit || exit 1
|
||||
if [ -d "$LOCAL_MODS_DIR/$TAKISTAN_MOD_ID/Mission/$takistan" ] ; then
|
||||
do_sync "$LOCAL_MODS_DIR/$TAKISTAN_MOD_ID/Mission/$takistan"/ "$REMOTE_MAPS/$takistan" || \
|
||||
die "failed to copy Takistan map files"
|
||||
fi
|
||||
|
||||
|
||||
msg "NOTE: deer isle doesn't get automatic updates... Skipping"
|
||||
}
|
||||
|
||||
main () {
|
||||
update_server
|
||||
update_stock_maps
|
||||
|
||||
for server in $(ls "$HOME/modlists" | xargs | sed 's/\.txt//g') ; do
|
||||
rm -rf "$HOME/.steam/debian-installation/steamapps/workshop/downloads"
|
||||
mkdir -p "$HOME/.steam/debian-installation/steamapps/workshop/downloads"
|
||||
update_mods "$server"
|
||||
done
|
||||
}
|
||||
|
||||
main "$@"
|
||||
305
modserver_update.sh
Normal file
305
modserver_update.sh
Normal file
@@ -0,0 +1,305 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# 01. "should check code directly not $?"
|
||||
# shellcheck disable=2181
|
||||
#
|
||||
# 02. "can't follow . import"
|
||||
# shellcheck disable=1090,1091
|
||||
#
|
||||
# 03. "possible misspelling"
|
||||
# shellcheck disable=2153
|
||||
#
|
||||
# 04. "use find .. over ls"
|
||||
# shellcheck disable=2011
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
||||
# ===================================================
|
||||
# 01. Attempt to load global DayZ values
|
||||
# ===================================================
|
||||
echo "Starting, attempting to load globals.sh"
|
||||
|
||||
# if we are called externally by one of the servers,
|
||||
# the command will be "~/dayz-servers/modserver_update.sh"
|
||||
# we need to change from $PWD to accomodate for that
|
||||
export WORKING_DIR=$PWD
|
||||
if [ ! -d "$WORKING_DIR"/lib ] ; then
|
||||
export WORKING_DIR="$HOME/dayz-servers"
|
||||
if [ ! -d "$WORKING_DIR"/lib ] ; then
|
||||
>&2 echo "Could not find lib. Exiting"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# grab fresh copy of all helper scripts / libraries
|
||||
if [ -d "$WORKING_DIR/lib" ] ; then
|
||||
cp -f "$WORKING_DIR/lib"/* .
|
||||
fi
|
||||
|
||||
GLOBALS_FILE="$WORKING_DIR/globals.sh"
|
||||
if [ -e "$GLOBALS_FILE" ] ; then
|
||||
chmod +x "$GLOBALS_FILE"
|
||||
. "$GLOBALS_FILE"
|
||||
else
|
||||
>&2 echo "Could not load: $GLOBALS_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ===================================================
|
||||
# 02. Local script variables
|
||||
# ===================================================
|
||||
export STEAMCMD_USER=steam
|
||||
export MODLISTS="$WORKING_DIR/modlists"
|
||||
|
||||
export LOCAL_STOCK="$HOME/stock"
|
||||
export LOCAL_STOCK_GAME="$LOCAL_STOCK/DayZ"
|
||||
export LOCAL_STOCK_SERVER="$LOCAL_STOCK/DayZServer"
|
||||
export LOCAL_MODS="$HOME/mods"
|
||||
|
||||
# ===================================================
|
||||
# 03. Mount network drive
|
||||
# ===================================================
|
||||
if ! is_network_drive_mounted ; then
|
||||
mount_dayz_network_drive
|
||||
|
||||
if ! is_network_drive_mounted ; then
|
||||
die "Could not mount network drive"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ===================================================
|
||||
# 04. Checks
|
||||
# ===================================================
|
||||
check() {
|
||||
mkdir -p "$LOCAL_STOCK_GAME" "$LOCAL_STOCK_SERVER" "$LOCAL_MODS"
|
||||
|
||||
if [ "$USER" != "$STEAMCMD_USER" ] ; then
|
||||
die "Current user: '$USER' does not match '$STEAMCMD_USER'"
|
||||
fi
|
||||
|
||||
if [ ! -d "$MODLISTS" ] ; then
|
||||
die "Could not find modlists at: $MODLISTS"
|
||||
fi
|
||||
|
||||
if [ ! -d "$REMOTE_MODS" ] ; then
|
||||
die "Could not find remote mods at: $REMOTE_MODS"
|
||||
fi
|
||||
|
||||
if [ ! -d "$REMOTE_MAPS" ] ; then
|
||||
die "Could not find remote maps at: $REMOTE_MAPS"
|
||||
fi
|
||||
|
||||
if islocked_remote_server ; then
|
||||
die "Remote server already locked?"
|
||||
fi
|
||||
|
||||
msg "(MODSERVER): Health checks passed successfully."
|
||||
}
|
||||
|
||||
# ===================================================
|
||||
# 05. Begin functions
|
||||
# ===================================================
|
||||
update_server() {
|
||||
msg "(MODSERVER): STARTING UPDATING DAYZ SERVER"
|
||||
steamcmd -tcp \
|
||||
+force_install_dir "$LOCAL_STOCK_SERVER" \
|
||||
+@sSteamCmdForcePlatformType windows \
|
||||
+@ShutdownOnFailedCommand 1 \
|
||||
+login "$STEAM_USER" \
|
||||
+app_update "$DAYZ_SERVER_ID" \
|
||||
+quit
|
||||
|
||||
is_network_drive_mounted &&
|
||||
do_sync "$LOCAL_STOCK_SERVER"/ "$REMOTE_STOCK_SERVER"
|
||||
msg "(MODSERVER): FINISHED UPDATING DAYZ SERVER"
|
||||
}
|
||||
|
||||
update_game() {
|
||||
msg "(MODSERVER): STARTING UPDATING DAYZ GAME"
|
||||
steamcmd -tcp \
|
||||
+force_install_dir "$LOCAL_STOCK_GAME" \
|
||||
+@sSteamCmdForcePlatformType windows \
|
||||
+@ShutdownOnFailedCommand 1 \
|
||||
+login "$STEAM_USER" \
|
||||
+app_update "$DAYZ_GAME_ID" \
|
||||
+quit
|
||||
|
||||
is_network_drive_mounted &&
|
||||
do_sync "$LOCAL_STOCK_GAME"/ "$REMOTE_STOCK_GAME"
|
||||
msg "(MODSERVER): FINISHED UPDATING DAYZ GAME"
|
||||
}
|
||||
|
||||
# args: $1 = server_modlist.txt to update
|
||||
update_mods_for_server() {
|
||||
msg "(MODSERVER): UPDATING MODS FOR MAP: $1"
|
||||
|
||||
mods_file="$MODLISTS/$1"
|
||||
map_name=${1%.txt}
|
||||
remote_map_mod_dir="$REMOTE_MODS/$map_name"
|
||||
mkdir -p "$remote_map_mod_dir"
|
||||
|
||||
# Create temporary file to list all the mod_id's we are
|
||||
# going to download. This speeds up steamcmd and avoids rate limits.
|
||||
tempfile="/tmp/$map_name-mods_to_download.txt"
|
||||
:> "$tempfile"
|
||||
|
||||
# load the server_modlist.txt, copying the mod id's we need to update
|
||||
# to the temp file, while skipping comments and blank lines
|
||||
#
|
||||
# format should be: "mod_id^nickname"
|
||||
#
|
||||
# # Dabs Framework
|
||||
# # https://steamcommunity.com/sharedfiles/filedetails/?id=2545327648
|
||||
# 2545327648^dabsframework
|
||||
#
|
||||
while read -r mod ; do
|
||||
case "$mod" in
|
||||
\#*|''|' ')
|
||||
;;
|
||||
*)
|
||||
mod=${mod%%^*}
|
||||
|
||||
# check validity of syntax
|
||||
if [ -z "$mod" ] ; then
|
||||
die "mod for $map_name appears to be empty - syntax error"
|
||||
fi
|
||||
|
||||
printf "+workshop_download_item $DAYZ_GAME_ID %s\n" "$mod" >> "$tempfile"
|
||||
esac
|
||||
done <"$mods_file"
|
||||
unset mod
|
||||
|
||||
# shellcheck disable=2046
|
||||
steamcmd \
|
||||
-tcp \
|
||||
+force_install_dir "$LOCAL_MODS" \
|
||||
+@sSteamCmdForcePlatformType windows \
|
||||
+@ShutdownOnFailedCommand 1 \
|
||||
+login "$STEAM_USER" \
|
||||
$(xargs < "$tempfile") \
|
||||
+quit
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
die "Problem downloading mods for $map_name"
|
||||
fi
|
||||
|
||||
msg "(MODSERVER): RENAMING MODS"
|
||||
|
||||
# blank map's mods.txt
|
||||
:> "$remote_map_mod_dir/mods.txt"
|
||||
|
||||
while read -r mod ; do
|
||||
# skip comments, blank lines
|
||||
case "$mod" in
|
||||
\#*|''|' ')
|
||||
;;
|
||||
*)
|
||||
mod_id=${mod%%^*}
|
||||
mod_name=${mod##*^}
|
||||
if [ ! -d "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$mod_id" ] ; then
|
||||
die "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$mod_id does not exist"
|
||||
fi
|
||||
do_sync "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$mod_id"/ "$remote_map_mod_dir/@${mod_name}"
|
||||
printf '@%s\n' "$mod_name" >> "$remote_map_mod_dir/mods.txt"
|
||||
msg "(MODSERVER): Finished syncing: $mod_name"
|
||||
esac
|
||||
done < "$mods_file"
|
||||
|
||||
rm -f "$tempfile" 2>/dev/null ||:
|
||||
unset tempfile mod map_name mods_file mod_name mod_id remote_map_mod_dir
|
||||
|
||||
msg "(MODSERVER): FINISHED UPDATING MODS FOR MAP: $1"
|
||||
}
|
||||
|
||||
update_stock_maps() {
|
||||
msg "(MODSERVER): UPDATING MAPS"
|
||||
|
||||
msg "(MODSERVER): Copying Stock Chernarus"
|
||||
do_sync \
|
||||
"$LOCAL_STOCK_SERVER/mpmissions/$CHERNARUS_MAP_NAME"/ \
|
||||
"$REMOTE_MAPS/$CHERNARUS_MAP_NAME"
|
||||
|
||||
msg "(MODSERVER): Updating Namalsk Survival"
|
||||
steamcmd \
|
||||
-tcp \
|
||||
+force_install_dir "$LOCAL_MODS" \
|
||||
+@sSteamCmdForcePlatformType windows \
|
||||
+@ShutdownOnFailedCommand 1 \
|
||||
+login "$STEAM_USER" \
|
||||
+workshop_download_item \
|
||||
"$DAYZ_GAME_ID" \
|
||||
"$NAMALSK_SURVIVAL_MOD_ID" \
|
||||
+quit
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
die "Failed to update Namalsk Survival"
|
||||
fi
|
||||
|
||||
if [ -d "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$NAMALSK_SURVIVAL_MOD_ID/Extras/Regular/$NAMALSK_MAP_NAME" ] ; then
|
||||
do_sync "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$NAMALSK_SURVIVAL_MOD_ID/Extras/Regular/$NAMALSK_MAP_NAME"/ \
|
||||
"$REMOTE_MAPS/$NAMALSK_MAP_NAME" || \
|
||||
die "failed to copy Namalsk map files"
|
||||
fi
|
||||
|
||||
msg "(MODSERVER): Updating Namalsk Island"
|
||||
steamcmd \
|
||||
-tcp \
|
||||
+force_install_dir "$LOCAL_MODS" \
|
||||
+@sSteamCmdForcePlatformType windows \
|
||||
+@ShutdownOnFailedCommand 1 \
|
||||
+login "$STEAM_USER" \
|
||||
+workshop_download_item \
|
||||
"$DAYZ_GAME_ID" \
|
||||
"$NAMALSK_ISLAND_MOD_ID" \
|
||||
+quit
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
die "Failed to update Namalsk Island"
|
||||
fi
|
||||
|
||||
####################TODO: # msg "Updating Optimized Namalsk Server PBOs"
|
||||
|
||||
msg "(MODSERVER): Updating TakistanPlus"
|
||||
steamcmd \
|
||||
-tcp \
|
||||
+force_install_dir "$LOCAL_MODS" \
|
||||
+@sSteamCmdForcePlatformType windows \
|
||||
+@ShutdownOnFailedCommand 1 \
|
||||
+login "$STEAM_USER" \
|
||||
+workshop_download_item \
|
||||
"$DAYZ_GAME_ID" \
|
||||
"$TAKISTAN_MOD_ID" \
|
||||
+quit
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
die "Failed to update TakistanPlus"
|
||||
fi
|
||||
|
||||
if [ -d "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$TAKISTAN_MOD_ID/Mission/$TAKISTAN_MAP_NAME" ] ; then
|
||||
do_sync "$LOCAL_MODS/steamapps/workshop/content/$DAYZ_GAME_ID/$TAKISTAN_MOD_ID/Mission/$TAKISTAN_MAP_NAME"/ \
|
||||
"$REMOTE_MAPS/$TAKISTAN_MAP_NAME" || \
|
||||
die "failed to copy Takistan map files"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
check || die "Failed to pass health checks"
|
||||
|
||||
lock_remote_server
|
||||
|
||||
update_server
|
||||
update_game
|
||||
update_stock_maps
|
||||
|
||||
for server in $(ls "$MODLISTS" | xargs) ; do
|
||||
if [ ! -f "$MODLISTS/$server" ] ; then
|
||||
msg "(MODSERVER): Could not find modlist for: $MODLISTS/$server"
|
||||
continue
|
||||
fi
|
||||
update_mods_for_server "$server"
|
||||
unset server
|
||||
done
|
||||
|
||||
unlock_remote_server
|
||||
}
|
||||
|
||||
main "$@" || exit 1
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo mount -t drvfs //truenas.local.wvr.sh/dayz /mnt/dayz
|
||||
1
scripts/choco_win2022_node_setup.bat
Normal file
1
scripts/choco_win2022_node_setup.bat
Normal file
@@ -0,0 +1 @@
|
||||
choco install -y firefox 7zip cpu-z hwinfo vcredist2015 directx directx-sdk
|
||||
18
scripts/linux-setup.sh
Normal file
18
scripts/linux-setup.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $HOME
|
||||
|
||||
# =========================================================
|
||||
# RUN MY GENERIC SETUP SCRIPT
|
||||
# =========================================================
|
||||
git clone https://gitea.local.wvr.sh/mitch/linux-setup.git
|
||||
|
||||
cd linux-setup
|
||||
sh setup.sh
|
||||
|
||||
cp update.sh $HOME/
|
||||
chmod +x update.sh
|
||||
# =========================================================
|
||||
|
||||
# for modserver
|
||||
sudo apt install -y xmlstarlet jq cifs-utils samba-common
|
||||
6
scripts/re-pull-git.sh
Normal file
6
scripts/re-pull-git.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
chmod -x globals.sh 2>/dev/null ||:
|
||||
chmod -x lib/globals.sh 2>/dev/null ||:
|
||||
git stash
|
||||
git pull
|
||||
6
scripts/unlock_remote_server.sh
Normal file
6
scripts/unlock_remote_server.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./lib/globals.sh
|
||||
|
||||
unlock_remote_server
|
||||
|
||||
283
server_start.sh
Normal file
283
server_start.sh
Normal file
@@ -0,0 +1,283 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# 01. "should check code directly not $?"
|
||||
# shellcheck disable=2181
|
||||
#
|
||||
# 02. "can't follow . import"
|
||||
# shellcheck disable=1090,1091
|
||||
#
|
||||
# 03. "possible misspelling"
|
||||
# shellcheck disable=2153
|
||||
#
|
||||
# 04. "use find .. over ls"
|
||||
# shellcheck disable=2011
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
||||
# ===================================================
|
||||
# 01. Attempt to load global DayZ values
|
||||
# ===================================================
|
||||
echo "Starting, attempting to load globals.sh"
|
||||
|
||||
GLOBALS_FILE="$PWD/globals.sh"
|
||||
if [ -e "$GLOBALS_FILE" ] ; then
|
||||
chmod +x "$GLOBALS_FILE"
|
||||
. "$GLOBALS_FILE"
|
||||
else
|
||||
>&2 echo "Could not load: $GLOBALS_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ===================================================
|
||||
# 02. Local script variables
|
||||
# ===================================================
|
||||
#
|
||||
#
|
||||
# Local server file hierarchy:
|
||||
#
|
||||
# c:/DAYZ
|
||||
# ^--/servers
|
||||
# ^--/cache
|
||||
#
|
||||
export ORIGINAL_DIR="$PWD"
|
||||
export LOCAL_DAYZ_FILES="/mnt/c/DAYZ"
|
||||
export CACHE="$LOCAL_DAYZ_FILES/cache"
|
||||
export STOCK_SERVER_CACHE="$CACHE/stock_server"
|
||||
export MOD_CACHE="$CACHE/mods"
|
||||
export SERVERS="$LOCAL_DAYZ_FILES/servers"
|
||||
|
||||
# ===================================================
|
||||
# 03. Mount network drive
|
||||
# ===================================================
|
||||
if ! is_network_drive_mounted ; then
|
||||
mount_dayz_network_drive
|
||||
|
||||
if ! is_network_drive_mounted ; then
|
||||
die "Could not mount network drive"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ===================================================
|
||||
# 04. init and checks
|
||||
# ===================================================
|
||||
check() {
|
||||
if [ ! -d "$LOCAL_DAYZ_FILES" ] ; then
|
||||
die "dir: $LOCAL_DAYZ_FILES does not exist"
|
||||
fi
|
||||
if [ ! -d "$SERVER_HOME" ] ; then
|
||||
die "dir: $SERVER_HOME does not exist"
|
||||
fi
|
||||
|
||||
msg "Health checks completed successfully."
|
||||
}
|
||||
|
||||
init_server() {
|
||||
mkdir -p "$SERVER_HOME" "$CACHE" "$MOD_CACHE" "$STOCK_SERVER_CACHE" "$LOCAL_DAYZ_FILES/stock/maps/$MAP_FOLDER_NAME"
|
||||
:>"$SERVER_HOME/modstring"
|
||||
|
||||
check || die "Failed check()"
|
||||
|
||||
msg "Completed intialization. Using server restart time of $RESTART_INTERVAL seconds."
|
||||
}
|
||||
|
||||
# ===================================================
|
||||
# 05. Load stock files
|
||||
# ===================================================
|
||||
load_stock_map_data() {
|
||||
mkdir -p "$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME"
|
||||
|
||||
do_sync --exclude='*storage_1*' \
|
||||
"$LOCAL_DAYZ_FILES/stock/maps/$MAP_FOLDER_NAME"/ \
|
||||
"$SERVER_HOME/mpmissions/$MAP_FOLDER_NAME" || \
|
||||
die "Failed to copy remote stock map data to local cache"
|
||||
}
|
||||
|
||||
refresh_local_cache() {
|
||||
msg "Refreshing local stock server cache"
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_STOCK_SERVER"/ "$STOCK_SERVER_CACHE" || \
|
||||
die "Failed to copy remote stock server data to local cache"
|
||||
msg "Sucessfully copied stock server data into local cache"
|
||||
# -------------------------------------
|
||||
msg "Refreshing local map data cache for: $MAP_FOLDER_NAME"
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_MAPS/$MAP_FOLDER_NAME"/ "$LOCAL_DAYZ_FILES/stock/maps/$MAP_FOLDER_NAME" || \
|
||||
die "Failed to copy remote stock map data for: $MAP_FOLDER_NAME"
|
||||
msg "Successfully copied stock map data for: $MAP_FOLDER_NAME"
|
||||
# -------------------------------------
|
||||
msg "Refreshing local mods cache"
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_MODS"/ "$MOD_CACHE" || \
|
||||
die "Failed to copy remote mods to local cache"
|
||||
msg "Successfully copied remote mods into local cache"
|
||||
}
|
||||
|
||||
setup_environment() {
|
||||
msg "Setting up environment"
|
||||
msg "Copying stock server data from local cache into $SERVER_HOME"
|
||||
# list of all stock server folders
|
||||
for folder in addons battleye bliss docs dta keys ; do
|
||||
do_sync "$STOCK_SERVER_CACHE/$folder"/ "$SERVER_HOME/$folder" || die "Failed to copy stock: $folder"
|
||||
done
|
||||
# list of all stock server files
|
||||
for file in dayz.gproj dayzsetting.xml whitelist.txt \
|
||||
DayZServer_x64.exe steam_api64.dll steamclient64.dll \
|
||||
tier0_s64.dll vstdlib_s64.dll ; do
|
||||
cp -fv "$STOCK_SERVER_CACHE/$file" "$SERVER_HOME/$file" || die "Failed to copy stock: $file"
|
||||
done
|
||||
|
||||
msg "Copying into $SERVER_HOME stock map data for: $MAP_FOLDER_NAME"
|
||||
load_stock_map_data
|
||||
|
||||
msg "Copying mod files from local cache into $SERVER_HOME"
|
||||
do_sync "$MOD_CACHE/$MAP_FOLDER_NAME"/ "$SERVER_HOME/mods" || die "Failed to copy mods to $SERVER_HOME"
|
||||
|
||||
msg "Copying DZSA executable"
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_DIR/res/software/DZSALModServer.exe" "$SERVER_HOME"/ || \
|
||||
die "Failed to copy DZSALModServer.exe"
|
||||
}
|
||||
|
||||
# finds list of mods to load and stores them in modstring file
|
||||
# to be used as parameters to the server
|
||||
load_mods() {
|
||||
msg "Loading mods"
|
||||
if [ ! -f "$MOD_CACHE/$MAP_FOLDER_NAME/mods.txt" ] ; then
|
||||
die "mods.txt list for $MAP_FOLDER_NAME is missing"
|
||||
fi
|
||||
|
||||
mkdir -p "$SERVER_HOME/mods"
|
||||
|
||||
_modstring=""
|
||||
while read -r mod ; do
|
||||
case $mod in
|
||||
'@'*)
|
||||
msg "- Found mod: $mod"
|
||||
_modstring="$_modstring;mods/$mod"
|
||||
|
||||
# common spelling differences, check for all
|
||||
for addon_folder in addons Addons addon Addon add_ons add_on Add_on Add_ons ; do
|
||||
if [ -d "$SERVER_HOME/mods/$mod/$addon_folder" ] ; then
|
||||
for addon in "$SERVER_HOME/mods/$mod/$addon_folder"/* ; do
|
||||
if [ ! -f "$SERVER_HOME/addons/${addon##*/}" ] ; then
|
||||
cp -f "$addon" "$SERVER_HOME/addons/"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
for key_folder in keys Keys key Key ; do
|
||||
if [ -d "$SERVER_HOME/mods/$mod/$key_folder" ] ; then
|
||||
for key in "$SERVER_HOME/mods/$mod/$key_folder"/* ; do
|
||||
if [ ! -f "$SERVER_HOME/keys/${key##*/}" ] ; then
|
||||
cp -f "$key" "$SERVER_HOME/keys/"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
esac
|
||||
done < "$MOD_CACHE/$MAP_FOLDER_NAME/mods.txt"
|
||||
|
||||
# trim the initial leading ';'
|
||||
_modstring=${_modstring#;}
|
||||
printf '%s\n' "$_modstring" > modstring
|
||||
msg "Mods successfully loaded."
|
||||
}
|
||||
|
||||
# ===================================================
|
||||
# 06. Start function
|
||||
# ===================================================
|
||||
start_server() {
|
||||
check || die "Failed check()"
|
||||
cd "$SERVER_HOME" || die "Could not cd to '$SERVER_HOME'"
|
||||
|
||||
wait_until_remote_server_unlocked
|
||||
setup_environment || die "Could not set up environment."
|
||||
load_mods || die "Could not load mods"
|
||||
|
||||
# =====================================================================================
|
||||
# creating temp.bat here to avoid the arg max char limit of windows cmd.exe
|
||||
PROCESS_NAME="SERVER: $SERVER_NAME"
|
||||
cat > temp.bat <<EOF
|
||||
:start
|
||||
start "$PROCESS_NAME" ^
|
||||
/min DZSALModServer.exe ^
|
||||
-config=serverDZ.cfg ^
|
||||
-port="$SERVER_PORT" ^
|
||||
-profiles=Profilesfolder ^
|
||||
-mod="$(cat modstring)" ^
|
||||
-cpuCount="$SERVER_CPU" ^
|
||||
-dologs -adminlog -netlog -freezecheck
|
||||
EOF
|
||||
# =====================================================================================
|
||||
|
||||
# start the server
|
||||
cmd.exe /C temp.bat
|
||||
rm -f temp.bat modstring 2>/dev/null ||:
|
||||
|
||||
msg "Server started: $(date)"
|
||||
msg "RESTART_INTERVAL: $RESTART_INTERVAL"
|
||||
|
||||
count=0
|
||||
while [ "$count" -lt "$RESTART_INTERVAL" ] ; do
|
||||
sleep 60
|
||||
count=$((count + 60))
|
||||
msg "TIME LEFT BEFORE RESTART: $(( (RESTART_INTERVAL - count) / 60 )) minutes"
|
||||
done
|
||||
|
||||
msg "Time up - Killing server"
|
||||
cmd.exe /C taskkill /FI "WINDOWTITLE eq $PROCESS_NAME"
|
||||
|
||||
msg "Sleeping 10 seconds to settle"
|
||||
sleep 10
|
||||
msg "SERVER IS RESTARTING"
|
||||
}
|
||||
|
||||
# ===================================================
|
||||
# 07. Main loop
|
||||
# ===================================================
|
||||
|
||||
main() {
|
||||
NUMBER_OF_STARTS=0
|
||||
|
||||
while true ; do
|
||||
NUMBER_OF_STARTS=$((NUMBER_OF_STARTS + 1))
|
||||
msg "Server is preparing to start..."
|
||||
msg "NUMBER OF STARTS: $NUMBER_OF_STARTS"
|
||||
|
||||
cd "$ORIGINAL_DIR" || die "Can no longer cd to $ORIGINAL_DIR"
|
||||
|
||||
if [ -e ./SERVER.ENV ] ; then
|
||||
. ./SERVER.ENV
|
||||
else
|
||||
die "Could not source ./SERVER.ENV"
|
||||
fi
|
||||
|
||||
# this must be here and not up top as we must load it from the SERVER.ENV
|
||||
export SERVER_HOME="$SERVERS/$SERVER_NAME"
|
||||
|
||||
# create directories in $SERVER_HOME, blank the modstring
|
||||
init_server
|
||||
|
||||
if [ -e ./serverDZ.cfg ] ; then
|
||||
cp -f ./serverDZ.cfg "$SERVER_HOME"/ || die "Failed to copy ./serverDZ into $SERVER_HOME"
|
||||
else
|
||||
die "Could not find ./serverDZ.cfg"
|
||||
fi
|
||||
|
||||
# trigger update for remote server game/map/mod files
|
||||
# for this, the current machine needs to have ssh-copy-id done
|
||||
# or else will ask for password
|
||||
ssh steam@dayz-modserver 'sh /home/steam/dayz-servers/modserver_update.sh'
|
||||
|
||||
# sync remote server stock and mod files into local cache
|
||||
refresh_local_cache || die "Failed to refresh local cache."
|
||||
|
||||
# load stock server, map, mod files into $SERVER_HOME
|
||||
setup_environment || die "Failed to setup environment."
|
||||
|
||||
# START THE SERVER - RUN ServerDZ.EXE
|
||||
start_server "$@"
|
||||
done
|
||||
}
|
||||
|
||||
main "$@" || exit 1
|
||||
16
servers/mitch_chernarus_test/SERVER.ENV
Normal file
16
servers/mitch_chernarus_test/SERVER.ENV
Normal file
@@ -0,0 +1,16 @@
|
||||
##!/bin/sh
|
||||
|
||||
export SERVER_NAME="mitch_chernarus_test"
|
||||
export MAP_FOLDER_NAME="$CHERNARUS_MAP_NAME"
|
||||
|
||||
export SERVER_PORT=2302
|
||||
|
||||
# number of threads to allocate
|
||||
export SERVER_CPU=10
|
||||
|
||||
# (4 hours, in seconds)
|
||||
################################# export RESTART_INTERVAL=$((60 * 60 * 4))
|
||||
|
||||
# (5 minutes)
|
||||
export RESTART_INTERVAL=$((5 * 60))
|
||||
|
||||
1
servers/mitch_chernarus_test/globals.sh
Symbolic link
1
servers/mitch_chernarus_test/globals.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
../../lib/globals.sh
|
||||
45
servers/mitch_chernarus_test/serverDZ.cfg
Normal file
45
servers/mitch_chernarus_test/serverDZ.cfg
Normal file
@@ -0,0 +1,45 @@
|
||||
hostname = "mitch_chernarus_test"; // Server name
|
||||
maxPlayers = 10; // Maximum amount of players
|
||||
|
||||
steamQueryPort = 2306;
|
||||
|
||||
password = "";
|
||||
passwordAdmin = "SuperSecretAdmin1!";
|
||||
|
||||
class Missions
|
||||
{
|
||||
class DayZ
|
||||
{
|
||||
template="dayzOffline.chernarusplus"; // Mission to load on server startup. <MissionName>.<TerrainName>
|
||||
// Vanilla mission: dayzOffline.chernarusplus
|
||||
// DLC mission: dayzOffline.enoch
|
||||
};
|
||||
};
|
||||
|
||||
vonCodecQuality = 20; // Voice over network codec quality, the higher the better (values 0-30)
|
||||
disable3rdPerson = 1;
|
||||
disableCrosshair = 1;
|
||||
disablePersonalLight = 1;
|
||||
|
||||
serverTimeAcceleration=12; // Accelerated Time (value 0-24)// This is a time multiplier for in-game time. In this case, the time would move 24 times faster than normal, so an entire day would pass in one hour.
|
||||
serverNightTimeAcceleration=1; // Accelerated Nigh Time - The numerical value being a multiplier (0.1-64) and also multiplied by serverTimeAcceleration value. Thus, in case it is set to 4 and serverTimeAcceleration is set to 2, night time would move 8 times faster than normal. An entire night would pass in 3 hours.
|
||||
|
||||
|
||||
enableWhitelist = 0;
|
||||
verifySignatures = 2; // Verifies .pbos against .bisign files. (only 2 is supported)
|
||||
forceSameBuild = 1; // When enabled, the server will allow the connection only to clients with same the .exe revision as the server (value 0-1)
|
||||
disableVoN = 0; // Enable/disable voice over network (value 0-1)
|
||||
|
||||
lightingConfig = 0; // 0 for brighter night setup, 1 for darker night setup
|
||||
|
||||
serverTime="SystemTime"; // Initial in-game time of the server. "SystemTime" means the local time of the machine. Another possibility is to set the time to some value in "YYYY/MM/DD/HH/MM" format, f.e. "2015/4/8/17/23" .
|
||||
serverTimePersistent=0; // Persistent Time (value 0-1)// The actual server time is saved to storage, so when active, the next server start will use the saved time value.
|
||||
|
||||
guaranteedUpdates=1; // Communication protocol used with game server (use only number 1)
|
||||
|
||||
loginQueueConcurrentPlayers=5; // The number of players concurrently processed during the login process. Should prevent massive performance drop during connection when a lot of people are connecting at the same time.
|
||||
loginQueueMaxPlayers=500; // The maximum number of players that can wait in login queue
|
||||
|
||||
instanceId = 1; // DayZ server instance id, to identify the number of instances per box and their storage folders with persistence files
|
||||
storageAutoFix = 1; // Checks if the persistence files are corrupted and replaces corrupted ones with empty ones (value 0-1)
|
||||
|
||||
1
servers/mitch_chernarus_test/server_start.sh
Symbolic link
1
servers/mitch_chernarus_test/server_start.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
../../server_start.sh
|
||||
12
wsl_setup.sh
12
wsl_setup.sh
@@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
touch $HOME/.hushlogin
|
||||
|
||||
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt dist-upgrade -y
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user