diff options
Diffstat (limited to 'backend/resilient/freenet.py')
-rw-r--r-- | backend/resilient/freenet.py | 12 |
1 files changed, 8 insertions, 4 deletions
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 |