feat: systemd service unit file
This commit is contained in:
parent
70d41cc4bc
commit
6b80254e0b
20
ncnu-course-api.service
Normal file
20
ncnu-course-api.service
Normal file
@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=NCNU-Course Python Backend API
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=python3 api.py
|
||||
Restart=always
|
||||
|
||||
WorkingDirectory=/var/www/html/NCNU_Course
|
||||
User=pi
|
||||
|
||||
RestartSec=10s
|
||||
|
||||
StandardOutput=syslog
|
||||
StandardOutput=syslog
|
||||
SyslogIdentifier=ncnu-course
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue
Block a user