seafile_ynh/conf/add_sso_conf_webdav.py
2015-08-24 20:45:36 +02:00

8 lines
No EOL
283 B
Python

import json
with open("/etc/ssowat/conf.json.persistent", "r") as jsonFile:
data = json.load(jsonFile)
data["unprotected_urls"].append("/seafdav")
with open("/etc/ssowat/conf.json.persistent", "w") as jsonFile:
jsonFile.write(json.dumps(data, indent=4, sort_keys=True))