File: /volume1/@appstore/SynologyPhotos/sdk-plugin/synology_foto_userhome_service.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2000 - present Synology Inc. All rights reserved.
from os import environ
from importlib.util import spec_from_file_location, module_from_spec
module_name = "common"
module_path = "/var/packages/SynologyPhotos/target/sdk-plugin/common.py"
spec = spec_from_file_location(module_name, module_path)
common = module_from_spec(spec)
spec.loader.exec_module(common)
class UserhomeService(common.PluginRunner):
def post(self):
if "0" != environ.get("RESULT"):
return None
if not self.is_package_running():
return None
self.send_command("user-home-enable-change")
common.MainBody(UserhomeService())