From 75a2cc7acb5a2a83dae172003b13729baf2e2756 Mon Sep 17 00:00:00 2001 From: Karl Semich <0xloem@gmail.com> Date: Sat, 27 Aug 2016 06:20:06 -0400 Subject: added pyFreenet as a submodule --- backend/resilient/freenet.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'backend/resilient/freenet.py') diff --git a/backend/resilient/freenet.py b/backend/resilient/freenet.py index 92affef..76ee33d 100644 --- a/backend/resilient/freenet.py +++ b/backend/resilient/freenet.py @@ -1,4 +1,4 @@ -from resilient import auth_path, git, ikiwiki, url200 +from resilient import auth_path, dep_path, git, ikiwiki, url200 import os running = url200('http://127.0.0.1:8888/') @@ -11,9 +11,13 @@ class gitocalypse(git): print("WARNING: gitocalypse not found, changes won't be synced with freenet") class freesitemgr(): - found = (os.system("freesitemgr --version") == 0) + binary = "freesitemgr" + found = (os.system("%s --version" % binary) == 0) if not found: - print("WARNING: freesitemgr/pyFreenet not found, public freesite won't be updated") + binary = "%s/pyFreenet/freesitemgr" % dep_path + found = (os.system("%s --version" % binary) == 0) + if not found: + print("WARNING: freesitemgr/pyFreenet not found. freesite won't be updated") def __init__(self): pass @@ -22,5 +26,5 @@ class freesitemgr(): if not ikiwiki.synced or not freesitemgr.found or not running: return False config_path = os.path.join(auth_path, 'freesitemgr') - status = os.system("freesitemgr -c '%s' -v -r 1 update" % config_path) + status = os.system("%s -c '%s' -v -r 1 update" % (freesitemgr.binary, config_path)) return status == 0 -- cgit v1.2.3