"""Encode run-owned daemon environment without changing inherited session guards."""
import json
from pathlib import Path
import sys

op, destination, home = sys.argv[1:]
if op != 'environment':
    raise ValueError(op)
with Path(destination).open('x', encoding='utf-8') as out:
    json.dump({'SPT_HOME':home, 'SPT_INSTALL_NO_FIREWALL':'1'}, out)
