summaryrefslogtreecommitdiff
path: root/backend/resilient/freenet.py
diff options
context:
space:
mode:
authorKarl Semich <0xloem@gmail.com>2016-08-27 06:20:06 -0400
committerKarl Semich <0xloem@gmail.com>2016-08-27 06:20:06 -0400
commit75a2cc7acb5a2a83dae172003b13729baf2e2756 (patch)
tree951701daedbae3cb3f6f43ad963da0eed5bb5ee0 /backend/resilient/freenet.py
parent682ab0b0ddf2ec4de8742a011e29f023c2a03990 (diff)
downloadstandingwithresilience-75a2cc7acb5a2a83dae172003b13729baf2e2756.tar.gz
standingwithresilience-75a2cc7acb5a2a83dae172003b13729baf2e2756.zip
added pyFreenet as a submodule
Diffstat (limited to 'backend/resilient/freenet.py')
-rw-r--r--backend/resilient/freenet.py12
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