This file contains 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/bash | |
# Cisco Anyconnect CSD wrapper for OpenConnect | |
# Enter your vpn host here | |
CSD_HOSTNAME= | |
if [[ -z ${CSD_HOSTNAME} ]] | |
then | |
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting." | |
exit 1 | |
fi |
This file contains 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
/** | |
* An implementation on getting the human readable date format from milliseconds | |
* which is commonly used in Facebook, like about x hours ago. | |
* Convention as follows: | |
* 1000 milliseconds = 1 second, | |
* 60 seconds = 1 minute, | |
* 60 minutes = 1 hour, | |
* 24 hours = 1 day, | |
* 12 days = 1 month, | |
* 12 month = 1 year. |