Rev663, Faster SitePublish from command line if fileserver already running, Better OpenSSL lib close for update via webui, Close pyelliptic OpenSSL lib before update
This commit is contained in:
parent
ee70e2f022
commit
5b316180e6
6 changed files with 55 additions and 27 deletions
|
@ -74,6 +74,8 @@ class FileRequest(object):
|
|||
self.actionSetHashfield(params)
|
||||
elif cmd == "siteReload":
|
||||
self.actionSiteReload(params)
|
||||
elif cmd == "sitePublish":
|
||||
self.actionSitePublish(params)
|
||||
elif cmd == "ping":
|
||||
self.actionPing()
|
||||
else:
|
||||
|
@ -331,6 +333,15 @@ class FileRequest(object):
|
|||
|
||||
self.response({"ok": "Reloaded"})
|
||||
|
||||
def actionSitePublish(self, params):
|
||||
if self.connection.ip != "127.0.0.1" and self.connection.ip != config.ip_external:
|
||||
self.response({"error": "Only local host allowed"})
|
||||
|
||||
site = self.sites.get(params["site"])
|
||||
num = site.publish(inner_path=params.get("inner_path", "content.json"))
|
||||
|
||||
self.response({"ok": "Successfuly published to %s peers" % num})
|
||||
|
||||
# Send a simple Pong! answer
|
||||
def actionPing(self):
|
||||
self.response("Pong!")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue