From d2515b577f5ebec5ad8a95c49f19e97dd2819307 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Sat, 13 Jul 2024 15:16:47 +0200 Subject: [PATCH] Update for Python 3.12 --- README.md | 5 +++++ install.sh | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d69146a..bacdde3 100644 --- a/README.md +++ b/README.md @@ -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 [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 * RAS diff --git a/install.sh b/install.sh index e84dc3d..4d4c748 100755 --- a/install.sh +++ b/install.sh @@ -10,14 +10,14 @@ if [ -f $run_directory/.disabled ]; then exit 0 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..." if [[ $user != 'root' ]]; then 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 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 else echo "WARNING: Could not find webssh directory! Could be due to major Python upgrade, or you not using PIP package."