Search Results

Search: Posts Made By: jeetz
1,571
Posted By Walter Misar
You want to prepend an echo on the last line ...
You want to prepend an echo on the last line ...
1,571
Posted By Corona688
That looks like you've got carriage returns in...
That looks like you've got carriage returns in your file. They send you to the beginning of the line.

You could probably rewrite your script much more efficiently if we knew the format of your...
19,672
Posted By RudiC
Actually, I think it was the final sleep n that...
Actually, I think it was the final sleep n that made it work, not the reduction from 2 to 1. The stdout of your brace expression { ... } was closed before all commands had executed on the router,...
19,672
Posted By RudiC
Try reducing the sleep periods to 1 sec, and add...
Try reducing the sleep periods to 1 sec, and add a sleep after the exit command.
3,998
Posted By rbatte1
So is what you are now asking for is a frequent...
So is what you are now asking for is a frequent poll and reboots at 10 minute intervals?

You have all you need really, you just have to adjust your logic and re-use what's been offered. Consider...
3,998
Posted By Klashxx
Try this: #!/bin/bash typeset -i interval=5 ...
Try this:
#!/bin/bash
typeset -i interval=5
run=true
trunk=vonage
reboot=0
while [[ "$run" == "true" ]]; do
checktrunk=$(asterisk -rx "sip show peer $trunk" | grep -c "Status.*OK")
if...
3,909
Posted By RudiC
Again, there's a fi missing. Do you want to...
Again, there's a fi missing.
Do you want to restart the network only if changed to ip1, or in both cases changing to and fro?
Try ifconfig eth0 |awk '/inet addr:/ {sub (/addr:/,"", $2); print $2}'
3,909
Posted By RudiC
Yes. And check for the missing fi! Its position...
Yes. And check for the missing fi! Its position is crucial for your logics.
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy