diff --git a/docker/src/s6-services/s6-init-dcs-server-autostart-longrun/run b/docker/src/s6-services/s6-init-dcs-server-autostart-longrun/run index d929a60..8f16373 100755 --- a/docker/src/s6-services/s6-init-dcs-server-autostart-longrun/run +++ b/docker/src/s6-services/s6-init-dcs-server-autostart-longrun/run @@ -38,6 +38,13 @@ if [ ! -f "$network_vault_path" ]; then exit 1 fi +dcs_lock_file="${DCS_saved_games_dir_release}/dcs.lock" +if [ -f "$dcs_lock_file" ]; then + echo "Error: File '$dcs_lock_file' is present. Server is already running or lockfile must be manually removed by user. Cannot autostart. Exiting." + sleep $TIMEOUT + exit 1 +fi + install_folder_path="/config/.wine/drive_c/Program Files/Eagle Dynamics" if [ ! -d "$install_folder_path" ]; then echo "No installation detected. Cannot autostart. Exiting"