Replace root user with %i, append --reload

This commit is contained in:
billz 2024-03-07 18:51:16 +01:00
parent 95acd497df
commit edc3a421ca

View file

@ -3,12 +3,13 @@ Description=raspap-restapi
After=network.target
[Service]
User=root
User=%i
WorkingDirectory=/etc/raspap/api
LimitNOFILE=4096
ExecStart=/usr/bin/python3 -m uvicorn main:app --host 0.0.0.0 --port 8081
ExecStart=/usr/bin/python3 -m uvicorn main:app --host 0.0.0.0 --port 8081 --reload
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target