by
0
6
3,313
1
Top 1% !
Popular
Famous
Tagged
Easy-to-find
Specified
Popularity: 3687th place
This snippet is Public
Languagebash
LicenseMIT_X11

Bash IP PPP interface status test

This script test IP/PPP interface status on linux
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/465/Bash-IP-PPP-interface-status-test?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
#!/bin/sh echo "======= TEST RUNNING ========" sleep $((60*15)) IF0_STATE=`ifconfig ptp_040 | grep RUNNING | wc -l` IF1_STATE=`ifconfig ptp_041 | grep RUNNING | wc -l` if [ ${IF0_STATE} -eq 1 ] && [ ${IF1_STATE} -eq 1 ] ; then echo "PASSED!" # reboot else while [ 1 ]; do echo "FAILED IF0_STATE : ${IF0_STATE} IF1_STATE:${IF1_STATE}" sleep 10 done fi
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus