Initial commit: SMS Forwarder project with Docker support

This commit is contained in:
zack
2025-07-17 19:30:35 +08:00
commit 152e136673
29 changed files with 3583 additions and 0 deletions

33
sms-forwarder.service Normal file
View File

@ -0,0 +1,33 @@
[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