diff options
author | Karl Semich <0xloem@gmail.com> | 2016-08-12 01:14:52 -0400 |
---|---|---|
committer | Karl Semich <0xloem@gmail.com> | 2016-08-12 01:14:52 -0400 |
commit | a0b1a963501b27a8c8a9cd6c42d38acbc2b8522d (patch) | |
tree | 52952d27cae1fa40372d603b4ba50d0dc79958b5 /backend/update.py | |
parent | 96563c8022366a85196a91207ff7a25617c9a7b5 (diff) | |
download | standingwithresilience-a0b1a963501b27a8c8a9cd6c42d38acbc2b8522d.tar.gz standingwithresilience-a0b1a963501b27a8c8a9cd6c42d38acbc2b8522d.zip |
Backend: IPFS implementation that uses only the binary
Diffstat (limited to 'backend/update.py')
-rwxr-xr-x | backend/update.py | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/backend/update.py b/backend/update.py index 0e9bcce..417ed2e 100755 --- a/backend/update.py +++ b/backend/update.py @@ -4,6 +4,26 @@ import resilient import resilient.freenet +####################### Instantiate hosts + +hosts = [] + +zeronet_urls = ['http://bit.no.com:43110'] +if resilient.zeronet.found: + hosts.append(resilient.zeronet('1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4', + '5JzZACCELsT4bx66qmV9JDaWhEQ6Sx6j7LzeucsxJGA9H7nuoRr')) + zeronet_urls.append('http://127.0.0.1:43110') + +ipfs_urls = ['https://ipfs.io'] +if resilient.ipfs.found: + ipfs_host = resilient.ipfs('ipfs-public') + ipfs_urls.append(ipfs_host.gateway) + hosts.append(ipfs_host) + +if resilient.freenet.freesitemgr.found and resilient.freenet.running: + hosts.append(resilient.freenet.freesitemgr()) # keys for freesitemgr are in auth/freesitemgr + + ##################### Instantiate remotes git_repos = [ @@ -11,9 +31,6 @@ git_repos = [ resilient.git('fairlystable-guest:/srv/git/standingwithresilience') ] -zeronet_urls = ['http://bit.no.com:43110'] -if resilient.zeronet.running: - zeronet_urls.append('http://127.0.0.1:43110') for host in zeronet_urls: git_repos.extend([ #### public zeronet #### @@ -22,6 +39,14 @@ for host in zeronet_urls: resilient.git('%s/1L363bqJnCG63SnV83kfV7izZXbmentctD/.git' % host, None) ]) +for host in ipfs_urls: + git_repos.extend([ + #### public ipfs #### + resilient.git('%s/ipns/QmPw1ZqrdEma823zTrnH9cVFF4j3YSeedrRjqPGj9Q8Utx/.git' % host, None), + #### private ipfs #### + resilient.git('%s/ipns/QmYMViYhjtwH2BkuHYRGJvPDWcXdNf2YcRFTTCzzqQGVn1/.git' % host, None) + ]) + if resilient.freenet.gitocalypse.found and resilient.freenet.running: git_repos.extend([ #### public freenet #### @@ -59,17 +84,6 @@ if not resilient.ikiwiki().push(): print (":: Exiting due to failure") exit(-1) -####################### Instantiate hosts - -hosts = [] - -if resilient.zeronet.found: - hosts.append(resilient.zeronet('1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4', - '5JzZACCELsT4bx66qmV9JDaWhEQ6Sx6j7LzeucsxJGA9H7nuoRr')) - -if resilient.freenet.freesitemgr.found and resilient.freenet.running: - hosts.append(resilient.freenet.freesitemgr()) # keys for freesitemgr are in auth/freesitemgr - ########################### Upload to all print (":: Publishing site ...") |