Generate a report of all VPN connects, system sleeps, and "location-awareness" messages for the last seven days. "location-awareness" log messages are generated by ControlPlane actions that are triggered based on my geographical location (home or work).
#!/bin/sh | |
reportfile=/vpn-reports/`date +%Y-%m-%d`.txt | |
echo "**** VPN report generated @ `date` ****" > $reportfile | |
syslog -k Sender pppd \ | |
-k Message "L2TP connection established." \ | |
-o -k Message "L2TP disconnected" \ | |
-o -k Sender location-awareness \ | |
-k Time ge -7d \ | |
-o -k Message Seq "System Sleep" \ | |
-k Sender kernel >> $reportfile |
This comment has been minimized.
This comment has been minimized.
The "location-awareness" ControlPlane actions are one-liner shell scripts looking like this:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.