add sys service
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=Circuit Recognition Web Service
|
||||
After=network.target
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/home/feie9454/elements_wires_congition
|
||||
Environment=PATH=/home/feie9454/elements_wires_congition/venv/bin
|
||||
ExecStart=/home/feie9454/elements_wires_congition/venv/bin/python main.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=circuit-recognition
|
||||
|
||||
# 安全设置
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=/home/feie9454/elements_wires_congition
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user