Skip to content
Snippets Groups Projects
Commit 820b0759 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

write the necessary client configuration to use our plugin

parent c5d37c33
No related branches found
No related tags found
1 merge request!10End-to-end with ristretto
...@@ -4,6 +4,7 @@ from os import environ ...@@ -4,6 +4,7 @@ from os import environ
from sys import argv from sys import argv
from shutil import which from shutil import which
from subprocess import check_output from subprocess import check_output
from configparser import ConfigParser
def main(): def main():
(introducerFURL,) = argv[1:] (introducerFURL,) = argv[1:]
...@@ -22,6 +23,18 @@ def main(): ...@@ -22,6 +23,18 @@ def main():
"/tmp/client", "/tmp/client",
]) ])
# Add necessary ZKAPAuthorizer configuration bits.
config = ConfigParser()
with open("/tmp/client/tahoe.cfg") as cfg:
config.read_file(cfg)
config.set(u"client", u"storage.plugins", u"privatestorageio-zkapauthz-v1")
config.add_section(u"storageclient.plugins.privatestorageio-zkapauthz-v1")
config.set(u"storageclient.plugins.privatestorageio-zkapauthz-v1", u"redeemer", u"ristretto")
with open("/tmp/client/tahoe.cfg", "wt") as cfg:
config.write(cfg)
run([ run([
"daemonize", "daemonize",
"-o", "/tmp/stdout", "-o", "/tmp/stdout",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment