mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-07 06:41:17 +00:00
More checking, less calling of the config function.
This commit is contained in:
parent
f2987ebe1e
commit
9edfcae0c9
1 changed files with 16 additions and 17 deletions
|
@ -99,7 +99,7 @@ fn_loadconfig_dayz(){
|
||||||
if [ ! -f "${SERVER_INSTALL_FILE}" ]
|
if [ ! -f "${SERVER_INSTALL_FILE}" ]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo -e "The DayZ server files are not installed. Run '${green}docker-compose exec --rm main dayzserver install${default}'"
|
echo -e "The DayZ server files are not installed. Run '${green}docker-compose run --rm main dayzserver install${default}'"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -108,18 +108,20 @@ fn_loadconfig_dayz(){
|
||||||
then
|
then
|
||||||
echo "Creating initial server configuration file"
|
echo "Creating initial server configuration file"
|
||||||
cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
||||||
elif ! diff -q "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
else
|
||||||
then
|
if ! diff -q "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
||||||
echo "========================================================================="
|
|
||||||
diff -Nau --color "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
|
||||||
echo "========================================================================="
|
|
||||||
if fn_prompt_yn "The new server configuration file differs from what's installed. Use it?"
|
|
||||||
then
|
then
|
||||||
echo "Updating the server configuration file"
|
echo "========================================================================="
|
||||||
cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
diff -Nau --color "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
||||||
else
|
echo "========================================================================="
|
||||||
echo "NOT updating the server configuration file"
|
if fn_prompt_yn "The new server configuration file differs from what's installed. Use it?"
|
||||||
fi
|
then
|
||||||
|
echo "Updating the server configuration file"
|
||||||
|
cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}"
|
||||||
|
else
|
||||||
|
echo "NOT updating the server configuration file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +134,6 @@ fn_start_dayz(){
|
||||||
echo
|
echo
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
fn_loadconfig_dayz
|
|
||||||
fn_workshop_mods
|
fn_workshop_mods
|
||||||
printf "[ ${green}DayZ${default} ] Starting server...\n"
|
printf "[ ${green}DayZ${default} ] Starting server...\n"
|
||||||
cd ${SERVER_FILES}
|
cd ${SERVER_FILES}
|
||||||
|
@ -192,7 +193,6 @@ fn_steamlogin_dayz(){
|
||||||
}
|
}
|
||||||
|
|
||||||
fn_runvalidate_dayz(){
|
fn_runvalidate_dayz(){
|
||||||
fn_loadconfig_dayz
|
|
||||||
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${appid}" validate +quit
|
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${appid}" validate +quit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,13 +209,11 @@ fn_install_dayz(){
|
||||||
}
|
}
|
||||||
|
|
||||||
fn_runupdate_dayz(){
|
fn_runupdate_dayz(){
|
||||||
fn_loadconfig_dayz
|
|
||||||
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${appid}" +quit
|
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${appid}" +quit
|
||||||
}
|
}
|
||||||
|
|
||||||
fn_update_dayz(){
|
fn_update_dayz(){
|
||||||
fn_steamlogin_dayz
|
fn_steamlogin_dayz
|
||||||
fn_loadconfig_dayz
|
|
||||||
appmanifestfile=${SERVER_FILES}/steamapps/appmanifest_"${appid}".acf
|
appmanifestfile=${SERVER_FILES}/steamapps/appmanifest_"${appid}".acf
|
||||||
printf "[ ... ] Checking for update:"
|
printf "[ ... ] Checking for update:"
|
||||||
# gets currentbuild
|
# gets currentbuild
|
||||||
|
@ -256,7 +254,6 @@ fn_update_dayz(){
|
||||||
|
|
||||||
fn_workshop_mods(){
|
fn_workshop_mods(){
|
||||||
fn_steamlogin_dayz
|
fn_steamlogin_dayz
|
||||||
fn_loadconfig_dayz
|
|
||||||
declare -a workshopID
|
declare -a workshopID
|
||||||
workshopfolder="${SERVER_FILES}/steamapps/workshop/content/${dayz_id}"
|
workshopfolder="${SERVER_FILES}/steamapps/workshop/content/${dayz_id}"
|
||||||
workshoplist=""
|
workshoplist=""
|
||||||
|
@ -337,6 +334,8 @@ Status:
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn_loadconfig_dayz
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
install)
|
install)
|
||||||
fn_install_dayz
|
fn_install_dayz
|
||||||
|
|
Loading…
Add table
Reference in a new issue