feat: systemd service unit file

This commit is contained in:
Ting-Jun Wang 2022-08-28 23:02:59 +08:00
parent 70d41cc4bc
commit 6b80254e0b
Signed by: snsd0805
GPG Key ID: 8DB0D22BC1217D33

20
ncnu-course-api.service Normal file
View 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