HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: //volume1/@appstore/SynologyPhotos/sdk-plugin/synology_foto_volume_mount.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 VolumeMount(common.PluginRunner):
    def post(self):
        if "0" != environ.get("RESULT"):
            return None

        if not self.is_package_running():
            return None

        self.send_command("set-user-info-expired")


common.MainBody(VolumeMount())