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
# sync files in an "autosync" directory on seedbox to local linux NAS (my book live etc) | |
# add this script to crontab | |
# this script will check whether local machine is online. | |
import subprocess, os, sys | |
import cPickle as pickle | |
def connchk(host,port): | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |