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
#!/usr/bin/python | |
import hmac, struct, time, base64, hashlib # for totp generation | |
import re, sys, subprocess # for general stuff | |
from getopt import getopt, GetoptError # pretending to be easy-to-use | |
# | |
# gtb - Google(auth) + Tunnelblick | |
# |
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
# Fix a failed Crashplan upgrade on a Synology NAS. | |
# This function should be run directly on the NAS, as root. | |
# | |
# Based on Chris Nelson's blog post from here: | |
# http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/ | |
function do_crashplan_upgrade() { | |
cp_target_dir="/var/packages/CrashPlan/target" | |
cp_upgrade_jar=`ls -t -1 "$cp_target_dir/upgrade/"*jar | head -n1` | |
cp_version=`basename "$cp_upgrade_jar" .jar` |