mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
change python -> python3
This commit is contained in:
parent
8eae2d1606
commit
aec0279135
@ -586,7 +586,7 @@ function _install_restapi() {
|
|||||||
_install_log "Installing and enabling RestAPI"
|
_install_log "Installing and enabling RestAPI"
|
||||||
sudo cp -r "$webroot_dir/api" "$raspap_dir/api" || _install_status 1 "Unable to move api folder"
|
sudo cp -r "$webroot_dir/api" "$raspap_dir/api" || _install_status 1 "Unable to move api folder"
|
||||||
|
|
||||||
if ! command -v python &> /dev/null; then
|
if ! command -v python3 &> /dev/null; then
|
||||||
echo "Python is not installed. Installing Python..."
|
echo "Python is not installed. Installing Python..."
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y python3 python3-pip
|
sudo apt install -y python3 python3-pip
|
||||||
@ -596,7 +596,7 @@ function _install_restapi() {
|
|||||||
sudo apt install python3-pip -y
|
sudo apt install python3-pip -y
|
||||||
|
|
||||||
fi
|
fi
|
||||||
python -m pip install -r "$raspap_dir/api/requirements.txt" --break-system-packages || _install_status 1 " Unable to install pip modules"
|
python3 -m pip install -r "$raspap_dir/api/requirements.txt" --break-system-packages || _install_status 1 " Unable to install pip modules"
|
||||||
|
|
||||||
echo "Moving restapi systemd unit control file to /lib/systemd/system/"
|
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 mv $webroot_dir/installers/restapi.service /lib/systemd/system/ || _install_status 1 "Unable to move restapi.service file"
|
||||||
|
@ -6,7 +6,7 @@ After=network.target
|
|||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/etc/raspap/api
|
WorkingDirectory=/etc/raspap/api
|
||||||
LimitNOFILE=4096
|
LimitNOFILE=4096
|
||||||
ExecStart=/usr/bin/python uvicorn main:app --host 0.0.0.0 --port 8081
|
ExecStart=/usr/bin/python3 uvicorn main:app --host 0.0.0.0 --port 8081
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user