From edc3a421cabeedf9e97153817bcace28cd876d28 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 7 Mar 2024 18:51:16 +0100 Subject: [PATCH] Replace root user with %i, append --reload --- installers/restapi.service | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/installers/restapi.service b/installers/restapi.service index 63748422..237dce79 100644 --- a/installers/restapi.service +++ b/installers/restapi.service @@ -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 \ No newline at end of file +WantedBy=multi-user.target +