From 9b8befed18a04077089e78262e8bb17c7fcf6700 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 3 Aug 2023 07:38:34 +0200 Subject: [PATCH] Fix install on Debian 12 --- install | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/install b/install index 3c94fa1..7d23ce3 100755 --- a/install +++ b/install @@ -229,17 +229,17 @@ wo_install_dep() { if [ ! -f /etc/apt/apt.conf.d/20auto-upgrades ]; then cp -f /usr/share/unattended-upgrades/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades fi - # upgrade pip - python3 -m pip install --upgrade pip } wo_timesync() { # set default ntp pools - if [ -f /etc/systemd/timesyncd.conf ]; then - if ! grep -q "time.cloudflare.com" /etc/systemd/timesyncd.conf; then - sed -e 's/^#NTP=/NTP=time.cloudflare.com 0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org/' -i /etc/systemd/timesyncd.conf - # enable ntp - timedatectl set-ntp 1 + if [ "$wo_distro_codename" != "bookworm" ]; then + if [ -f /etc/systemd/timesyncd.conf ]; then + if ! grep -q "time.cloudflare.com" /etc/systemd/timesyncd.conf; then + sed -e 's/^#NTP=/NTP=time.cloudflare.com 0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org/' -i /etc/systemd/timesyncd.conf + # enable ntp + timedatectl set-ntp 1 + fi fi fi } @@ -438,9 +438,7 @@ wo_install() { if [ -d /usr/local/lib/python3."$python_ver"/dist-packages ]; then cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 fi - if [ "$wo_distro_codename" = "bookworm" ]; then - python3 -m pip uninstall -yq wo wordops ee --break-system-packages - else + if [ "$wo_distro_codename" != "bookworm" ]; then python3 -m pip uninstall -yq wo wordops ee fi