Skip to content

Commit

Permalink
Add dcs.lock file check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aterfax committed May 12, 2024
1 parent 5c2b0fa commit 422e304
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ if [ "$AUTOSTART" -ne 1 ]; then
exit 1
fi

dcs_lock_file="${DCS_saved_games_dir_current}/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

network_vault_path="${DCS_saved_games_dir_current}/Config/network.vault"
if [ ! -f "$network_vault_path" ]; then
MSG="Error: File '$network_vault_path' does not exist. Cannot autostart without user logging in and saving credentials for autologin. Exiting."
Expand Down

0 comments on commit 422e304

Please sign in to comment.