mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-15 12:08:26 +00:00
Avoid useless warnings during install
This commit is contained in:
parent
fc39858dc8
commit
84a0768b6b
@ -289,27 +289,31 @@ checkConfig() {
|
||||
fi
|
||||
|
||||
# Environment configuration
|
||||
# arkserverexec
|
||||
if [ -n "$arkserverroot" ] && [ ! -f "$arkserverroot/$arkserverexec" ] ; then
|
||||
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
|
||||
fi
|
||||
|
||||
# SavedArks directory
|
||||
if [ -n "$arkserverroot" ]; then
|
||||
local savedarksdir="${arkserverroot}/ShooterGame/Saved/${ark_AltSaveDirectoryName:-SavedArks}"
|
||||
mkdir -p "${savedarksdir}"
|
||||
if [ ! -w "${savedarksdir}" ]; then
|
||||
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tThe ARK SavedArks directory is not writable, and saveworld will fail"
|
||||
if [ "$1" != "install" ]; then
|
||||
# arkserverexec
|
||||
if [ -n "$arkserverroot" ] && [ ! -f "$arkserverroot/$arkserverexec" ] ; then
|
||||
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Warn if any mods are requested but not installed
|
||||
if [ -n "$arkserverroot" -a -d "${arkserverroot}/ShooterGame/Content/Mods" ]; then
|
||||
for modid in $(getModIds); do
|
||||
if [ ! -f "${arkserverroot}/ShooterGame/Content/Mods/${modid}/mod.info" ]; then
|
||||
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tMod ${modid} is requested but not installed. Run 'arkmanager installmod ${modid}' to install this mod."
|
||||
# SavedArks directory
|
||||
if [ -n "$arkserverroot" ]; then
|
||||
local savedarksdir="${arkserverroot}/ShooterGame/Saved/${ark_AltSaveDirectoryName:-SavedArks}"
|
||||
mkdir -p "${savedarksdir}"
|
||||
if [ ! -w "${savedarksdir}" ]; then
|
||||
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tThe ARK SavedArks directory is not writable, and saveworld will fail"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$1" != "installmod" ] && [ "$1" != "installmods" ]; then
|
||||
# Warn if any mods are requested but not installed
|
||||
if [ -n "$arkserverroot" -a -d "${arkserverroot}/ShooterGame/Content/Mods" ]; then
|
||||
for modid in $(getModIds); do
|
||||
if [ ! -f "${arkserverroot}/ShooterGame/Content/Mods/${modid}/mod.info" ]; then
|
||||
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tMod ${modid} is requested but not installed. Run 'arkmanager installmod ${modid}' to install this mod."
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Warn if mod_branch=Linux
|
||||
@ -2897,7 +2901,7 @@ main(){
|
||||
(
|
||||
echo "Running command '${command}' for instance '${instance}'"
|
||||
useConfig "$instance"
|
||||
checkConfig
|
||||
checkConfig "$command"
|
||||
|
||||
case "$command" in
|
||||
run)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user