Files
sub2api-cn-relay-manager/scripts/deploy/sub2api-crm.service.template

29 lines
771 B
Plaintext
Raw Normal View History

[Unit]
Description=Sub2API CRM API Server (Port 18190)
After=network.target
[Service]
Type=simple
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/crm-only-20260602_18190
EnvironmentFile=/home/ubuntu/crm-only-20260602_18190/.env.crm
Environment="PATH=/usr/local/bin:/usr/bin:/bin"
ExecStart=/home/ubuntu/crm-only-20260602_18190/sub2api-cn-relay-manager-server
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=5
StandardOutput=append:/home/ubuntu/crm-only-20260602_18190/crm.log
StandardError=append:/home/ubuntu/crm-only-20260602_18190/crm.log
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/home/ubuntu/crm-only-20260602_18190
[Install]
WantedBy=multi-user.target