Fix install on Debian 12

This commit is contained in:
VirtuBox
2023-08-03 07:38:34 +02:00
parent 49d26e5656
commit 9b8befed18

18
install
View File

@@ -229,17 +229,17 @@ wo_install_dep() {
if [ ! -f /etc/apt/apt.conf.d/20auto-upgrades ]; then 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 cp -f /usr/share/unattended-upgrades/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades
fi fi
# upgrade pip
python3 -m pip install --upgrade pip
} }
wo_timesync() { wo_timesync() {
# set default ntp pools # set default ntp pools
if [ -f /etc/systemd/timesyncd.conf ]; then if [ "$wo_distro_codename" != "bookworm" ]; then
if ! grep -q "time.cloudflare.com" /etc/systemd/timesyncd.conf; then if [ -f /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 if ! grep -q "time.cloudflare.com" /etc/systemd/timesyncd.conf; then
# enable ntp 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
timedatectl set-ntp 1 # enable ntp
timedatectl set-ntp 1
fi
fi fi
fi fi
} }
@@ -438,9 +438,7 @@ wo_install() {
if [ -d /usr/local/lib/python3."$python_ver"/dist-packages ]; then if [ -d /usr/local/lib/python3."$python_ver"/dist-packages ]; then
cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1
fi fi
if [ "$wo_distro_codename" = "bookworm" ]; then if [ "$wo_distro_codename" != "bookworm" ]; then
python3 -m pip uninstall -yq wo wordops ee --break-system-packages
else
python3 -m pip uninstall -yq wo wordops ee python3 -m pip uninstall -yq wo wordops ee
fi fi