Skip to content

Commit

Permalink
fix:[#275] move conn check to flathub from cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon committed Oct 15, 2024
1 parent c92a807 commit 3289c4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vanilla_first_setup/utils/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_setup_commands(log_path, pre_run, post_run, commands):
f.write("exit 0\n")

# connection test
f.write("wget -q --spider cloudflare.com\n")
f.write("wget -q --spider flathub.org\n")
f.write("if [ $? != 0 ]; then\n")
f.write("echo 'No internet connection!'\n")
f.write("exit 1\n")
Expand All @@ -92,7 +92,7 @@ def get_setup_commands(log_path, pre_run, post_run, commands):
f.write("echo '# do not edit its content manually' >> " + next_boot_script_path + "\n")

# wait for connection
f.write(f"echo 'while [ \"$(wget -q --spider cloudflare.com; echo $?)\" != \"0\" ]; do' >> {next_boot_script_path}\n")
f.write(f"echo 'while [ \"$(wget -q --spider flathub.org; echo $?)\" != \"0\" ]; do' >> {next_boot_script_path}\n")
f.write(f"echo 'echo Waiting for internet connection...' >> {next_boot_script_path}\n")
f.write(f"echo 'sleep 5' >> {next_boot_script_path}\n")
f.write(f"echo 'done' >> {next_boot_script_path}\n")
Expand Down

0 comments on commit 3289c4c

Please sign in to comment.