16 lines
396 B
Python
Executable file
16 lines
396 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import json
|
|
import os
|
|
import subprocess
|
|
|
|
def main(tree, options):
|
|
enabled_services = options["enabled_services"]
|
|
|
|
for service in enabled_services:
|
|
subprocess.run([f"{tree}/usr/bin/systemctl", "--root", tree, "enable", service], check=True)
|
|
|
|
if __name__ == '__main__':
|
|
args = json.load(sys.stdin)
|
|
r = main(args["tree"], args["options"])
|
|
sys.exit(r)
|