Merge pull request #1630 from RaspAP/sec/restapi-svc

Security: set restapi.service file ownership
This commit is contained in:
Bill Zimmerman 2024-08-03 08:16:15 +02:00 committed by GitHub
commit 3a5766dcc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -545,6 +545,8 @@ function _install_restapi() {
fi
python3 -m pip install -r "$raspap_dir/api/requirements.txt" --break-system-packages || _install_status 1 " Unable to install pip modules"
echo "Setting permissions on restapi systemd unit control file"
sudo chown -c root:root $webroot_dir/installers/restapi.service || _install_status 1 "Unable change owner and/or group"
echo "Moving restapi systemd unit control file to /lib/systemd/system/"
sudo mv $webroot_dir/installers/restapi.service /lib/systemd/system/ || _install_status 1 "Unable to move restapi.service file"
sudo systemctl daemon-reload