예제 #1
0
		print "Where should these documents be evacuated to?"
		print "i.e. /full/path/to/root"
		evac_root = prompt("[DEFAULT %s]: " % default_evac_root)
		if len(evac_root) == 0:
			evac_root = default_evac_root

		try:
			restore_from = evacuate(evac_root=evac_root, omit_list=annex_includes)[0]
		except:
			print "Evacuation failed.  Continue? (y or n)"
			if prompt("[DEFAULT n]: ") != "y":
				exit(-1)
	
	print "Force-Quitting old instance"
	forceQuitUnveillance()

	with settings(warn_only=True):
		local("rm %s/*.txt" % MONITOR_ROOT)
		
	try:
		cron = CronTab(tabfile=os.path.join(MONITOR_ROOT, "uv_cron.tab"))
		for job in cron:
			job.enable(False)
		
		cron.remove_all()
		with settings(warn_only=True):
			local("crontab -r")
			local("rm %s" % os.path.join(MONITOR_ROOT, "uv_cron.tab"))

	except IOError as e:
예제 #2
0
from sys import argv

try:
	from Utils.funcs import forceQuitUnveillance
except ImportError as e:
	if DEBUG: print e
	from lib.Frontend.Utils.funcs import forceQuitUnveillance

if __name__ == "__main__":
	target = argv[1].split("/")[-1].replace(".py", "")
	forceQuitUnveillance(target=target)