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
#!/usr/bin/env python | |
def sec_to_human(secs): | |
secs = end_time - start_time | |
units = dict({ | |
7*24*3600: "week", | |
24*3600: "day", | |
3600: "hour", | |
60: "minute", | |
1: "second" |
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
#!/usr/bin/bash | |
# Add this script to /etc/crontab | |
# Set permissions to chmod 100 owner to execute only | |
# | |
echo "Keeping alive..." | |
IPSEC_CONN="iceland-vpn" | |
IS_UP_IPSEC=$(sudo ipsec status|grep ESTABLISHED|wc -l) | |
IS_CONNECTING=$(sudo ipsec status|grep "CONNECTING,"|wc -l) | |
if [[ $IS_CONNECTING -gt 0 ]] | |
then |
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
#!/usr/bin/bash | |
# Add this to /etc/crontab | |
# | |
echo "Checking for bad config files..." | |
BAD_GOOGLE_PAM_FILE=/home/user/.google_authenticator~ | |
HAS_BAD_GOOGLE_PAM_FILE=$(ls $BAD_GOOGLE_PAM_FILE|wc -w) | |
if [[ $HAS_BAD_GOOGLE_PAM_FILE -eq 1 ]] | |
then | |
sudo rm $BAD_GOOGLE_PAM_FILE | |
echo "Bad config found. Successfully removed." |