mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 17:10:26 +00:00
change python -> python3
This commit is contained in:
parent
8eae2d1606
commit
aec0279135
2 changed files with 3 additions and 3 deletions
|
@ -586,7 +586,7 @@ function _install_restapi() {
|
|||
_install_log "Installing and enabling RestAPI"
|
||||
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..."
|
||||
sudo apt update
|
||||
sudo apt install -y python3 python3-pip
|
||||
|
@ -596,7 +596,7 @@ function _install_restapi() {
|
|||
sudo apt install python3-pip -y
|
||||
|
||||
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/"
|
||||
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
|
||||
WorkingDirectory=/etc/raspap/api
|
||||
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
|
||||
RestartSec=5s
|
||||
|
||||
|
|
Loading…
Reference in a new issue