[Unit] Description=SMS Forwarder Service - iOS to Android notification forwarder After=network.target network-online.target Wants=network-online.target [Service] Type=simple User=zack Group=zack WorkingDirectory=/mnt/dsk1/code/project/notification Environment=PATH=/mnt/dsk1/code/project/notification/.venv/bin:/usr/local/bin:/usr/bin:/bin Environment=CONFIG_PATH=/mnt/dsk1/code/project/notification/config.yaml ExecStart=/mnt/dsk1/code/project/notification/.venv/bin/python -m sms_forwarder.main ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=10 StandardOutput=journal StandardError=journal SyslogIdentifier=sms-forwarder # 安全设置 NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ReadWritePaths=/mnt/dsk1/code/project/notification/logs /mnt/dsk1/code/project/notification/data # 资源限制 MemoryMax=256M CPUQuota=50% [Install] WantedBy=multi-user.target