Created
April 1, 2020 08:36
-
-
Save hplc/7a2fcc6de7f9237efe6bcb7004e74662 to your computer and use it in GitHub Desktop.
Test ocserv running status in OpenWrt, and restart it if not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
service=ocserv | |
if test $(netstat -na | grep 0.0.0.0:443 | wc -l) = 2 | |
then | |
echo "$service is running!" | |
else | |
/etc/init.d/$service start | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment