Update for Python 3.12

This commit is contained in:
Alexandre CATTEAU 2024-07-13 15:16:47 +02:00
parent b65b82f5d7
commit d2515b577f
2 changed files with 8 additions and 3 deletions

View File

@ -14,5 +14,10 @@ Following the release of version 1.6.2, we now install it in an applicative cont
For this service to be correctly accessed through reverse proxy, you need specific parameters. See For this service to be correctly accessed through reverse proxy, you need specific parameters. See
[official documentation](https://github.com/huashengdun/webssh#deployment). [official documentation](https://github.com/huashengdun/webssh#deployment).
### WARNING
* This manual install needs to be adjusted at each new major Python version upgrade:
* In `install.sh`, the path should be adjusted (`python3.11` --> `python3.12`)
* PIP package must be reinstalled, as packages are linked to Python version
### TODO ### TODO
* RAS * RAS

View File

@ -10,14 +10,14 @@ if [ -f $run_directory/.disabled ]; then
exit 0 exit 0
fi fi
if [ -f /usr/lib/python3.11/site-packages/webssh/handler.py ]; then if [ -f /usr/lib/python3.12/site-packages/webssh/handler.py ]; then
echo "Alter WebSSH configuration to remove SSH key passphrase from error message..." echo "Alter WebSSH configuration to remove SSH key passphrase from error message..."
if [[ $user != 'root' ]]; then if [[ $user != 'root' ]]; then
sudo sed -i -e "s/or wrong passphrase {} for decrypting it/or wrong passphrase for decrypting it/g" \ sudo sed -i -e "s/or wrong passphrase {} for decrypting it/or wrong passphrase for decrypting it/g" \
/usr/lib/python3.11/site-packages/webssh/handler.py /usr/lib/python3.12/site-packages/webssh/handler.py
else else
sed -i -e "s/or wrong passphrase {} for decrypting it/or wrong passphrase for decrypting it/g" \ sed -i -e "s/or wrong passphrase {} for decrypting it/or wrong passphrase for decrypting it/g" \
/usr/lib/python3.11/site-packages/webssh/handler.py /usr/lib/python3.12/site-packages/webssh/handler.py
fi fi
else else
echo "WARNING: Could not find webssh directory! Could be due to major Python upgrade, or you not using PIP package." echo "WARNING: Could not find webssh directory! Could be due to major Python upgrade, or you not using PIP package."