mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
Update sudoers .env permissions, systemd service user
This commit is contained in:
parent
5d8fed824a
commit
87216bdc02
2 changed files with 5 additions and 1 deletions
|
@ -28,6 +28,9 @@ www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop openvpn-client@client
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/systemctl disable openvpn-client@client
|
www-data ALL=(ALL) NOPASSWD:/bin/systemctl disable openvpn-client@client
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/systemctl start restapi.service
|
www-data ALL=(ALL) NOPASSWD:/bin/systemctl start restapi.service
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop restapi.service
|
www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop restapi.service
|
||||||
|
www-data ALL=(ALL) NOPASSWD:/bin/systemctl status restapi.service
|
||||||
|
www-data ALL=(ALL) NOPASSWD:/bin/touch /etc/raspap/api/.env
|
||||||
|
www-data ALL=(ALL) NOPASSWD:/bin/mv /tmp/.env /etc/raspap/api/.env
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/mv /tmp/ovpn/* /etc/openvpn/client/*.conf
|
www-data ALL=(ALL) NOPASSWD:/bin/mv /tmp/ovpn/* /etc/openvpn/client/*.conf
|
||||||
www-data ALL=(ALL) NOPASSWD:/usr/bin/ln -s /etc/openvpn/client/*.conf /etc/openvpn/client/*.conf
|
www-data ALL=(ALL) NOPASSWD:/usr/bin/ln -s /etc/openvpn/client/*.conf /etc/openvpn/client/*.conf
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/openvpn/client/*.conf
|
www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/openvpn/client/*.conf
|
||||||
|
|
|
@ -3,10 +3,11 @@ Description=raspap-restapi
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=%i
|
User=pi
|
||||||
WorkingDirectory=/etc/raspap/api
|
WorkingDirectory=/etc/raspap/api
|
||||||
LimitNOFILE=4096
|
LimitNOFILE=4096
|
||||||
ExecStart=/usr/bin/python3 -m uvicorn main:app --host 0.0.0.0 --port 8081 --reload
|
ExecStart=/usr/bin/python3 -m uvicorn main:app --host 0.0.0.0 --port 8081 --reload
|
||||||
|
ExecStop=/bin/kill -HUP ${MAINPID}
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue