Merge pull request #121 from AdamIsrael/fix-conn-test

fix: Change conn-check syntax
main
Mirko Brombin 2 years ago committed by GitHub
commit bf21de5ed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,12 +85,13 @@ class Processor:
if "VANILLA_FAKE" in os.environ: if "VANILLA_FAKE" in os.environ:
f.write("echo 'VANILLA_FAKE is set, not running commands'\n") f.write("echo 'VANILLA_FAKE is set, not running commands'\n")
f.write("exit 0\n") f.write("exit 0\n")
# connection test # connection test
f.write("wget -q --spider cloudflare.com") f.write("wget -q --spider cloudflare.com\n")
f.write("if [ $? != 0 ]; then") f.write("if [ $? != 0 ]; then\n")
f.write("echo 'No internet connection!'") f.write("echo 'No internet connection!'\n")
f.write("exit 1") f.write("exit 1\n")
f.write("fi\n")
for command in commands: for command in commands:
if command.startswith("!nextBoot"): if command.startswith("!nextBoot"):

Loading…
Cancel
Save