File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,25 @@ source /spark_utils.sh
88
99sleep 1
1010
11+ unzip_game_files () {
12+ if [[ " ${SRCDS_APPID} " == " 223350" ]]; then
13+ local unzip_excludes=()
14+
15+ [[ -f " dayzsetting.xml" ]] && unzip_excludes+=(" dayzsetting.xml" )
16+ [[ -f " serverDZ.cfg" ]] && unzip_excludes+=(" serverDZ.cfg" )
17+ [[ -f " ban.txt" ]] && unzip_excludes+=(" ban.txt" )
18+ [[ -f " whitelist.txt" ]] && unzip_excludes+=(" whitelist.txt" )
19+
20+ if [[ ${# unzip_excludes[@]} -gt 0 ]]; then
21+ unzip -o " ${ZIP_FILE} " -x " ${unzip_excludes[@]} "
22+ return
23+ fi
24+ fi
25+
26+ unzip -o " ${ZIP_FILE} "
27+ }
28+
29+
1130[[ ! -d $SERVER_HOME /steamcmd ]] && install_steamcmd
1231cd /home/container
1332
@@ -27,15 +46,15 @@ if [ "${AUTO_UPDATE}" == "1" ]; then
2746 rm -f " ${ZIP_FILE} "
2847 exit 1
2948 fi
30- unzip -o " ${ZIP_FILE} "
49+ unzip_game_files
3150 fi
3251 else
3352 wget -q -O " ${ZIP_FILE} " " ${REMOTE_URL} "
3453 if ! unzip -t " ${ZIP_FILE} " > /dev/null; then
3554 rm -f " ${ZIP_FILE} "
3655 exit 1
3756 fi
38- unzip -o " ${ZIP_FILE} "
57+ unzip_game_files
3958 fi
4059else
4160 echo -e " Not updating game server as auto update is off. Starting Server"
You can’t perform that action at this time.
0 commit comments