TristanBrotherton/netcheck

Running SH after reconnect

Closed this issue · 3 comments

As the readme said,

use -r <script path>

I've tried the following,

./netcheck.sh -i -r scripts/test.sh

test.sh has the following

#!/bin/bash 

#Reconnect
file="test.txt"
echo "$USER" > $file
cat $file

But the script doesn't run when the network is reconnected after I simulate a network downtime.

Am I doing something wrong?

-i is a one time install command. Please try again with out -i . You will need manually install the script as a service to use custom options.

I tried that, but it still didn't seem to run my script after reconnecting.

After I run netcheck.sh -i

I run netcheck.sh -r <path to script>

and I get netcheck.sh: command not found

------ Its possible I am doing it wrong ------

image

The issue is your script isn't found. It's unrelated to netcheck. Makes sure the script is in your path or you're providing the correct relative path.