diff --git a/ncnu-course-api.service b/ncnu-course-api.service new file mode 100644 index 0000000..09441f6 --- /dev/null +++ b/ncnu-course-api.service @@ -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