bmwskead wrote:Hello together,
I need a little bit of help with bash scripting. I want to modify SamyGo.sh a little bit and do not really know the right linux command for this. What I wanted to is the following:
1. if (remoteip is reachable) { do something }
How can I do "remoteip is reachable" in a programmatic way?
Code: Select all
ping -c 2 10.0.0.99 || echo "host 10.0.0.99 down"
Code: Select all
ping -c 2 10.0.0.99 && echo "host 10.0.0.99 up"
what you mean with "mounted correctly"?2. if(smb share is mounted correctly) { do something }
How can I do "smb share is mounted correctly" also in a programmatic way?
btw. you can look into the init scripts of extensions pack to see how to check hosts/mounts etc....
hthThank you very much for your help
arris