diff --git a/main.sh b/main.sh index 6ebdf9f..beb0efc 100644 --- a/main.sh +++ b/main.sh @@ -1,6 +1,6 @@ #!/bin/bash -CONFIG_FILE="/home/root/Zomboid/Server/servertest.ini" +CONFIG_FILE="/root/Zomboid/Server/servertest.ini" log_info() { echo "INFO: $1" @@ -14,7 +14,8 @@ log_error() { create_config_file() { if [ ! -f "$CONFIG_FILE" ]; then log_info "Configuration file not found. Creating a new one at $CONFIG_FILE." - cat <"$CONFIG_FILE" + mkdir -p "$(dirname "$CONFIG_FILE")" + cat >"$CONFIG_FILE" <