Merge pull request #550 from WordOps/updating-configuration
Fix for debian 12
This commit is contained in:
25
install
25
install
@@ -9,7 +9,7 @@
|
||||
# -------------------------------------------------------------------------
|
||||
# wget -qO wo wops.cc && sudo -E bash wo
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.16.4 - 2023-06-25
|
||||
# Version 3.17.0 - 2023-07-21
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# CONTENTS
|
||||
@@ -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,7 +438,10 @@ 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
|
||||
python3 -m pip uninstall -yq wo wordops ee
|
||||
if [ "$wo_distro_codename" != "bookworm" ]; then
|
||||
python3 -m pip uninstall -yq wo wordops ee
|
||||
fi
|
||||
|
||||
cd || exit 1
|
||||
if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then
|
||||
source /opt/wo/bin/activate
|
||||
@@ -461,7 +464,7 @@ wo_install() {
|
||||
elif [ "$wo_distro_codename" = "bullseye" ]; then
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt
|
||||
elif [ "$wo_distro_codename" = "bookworm" ]; then
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.5.3#egg=python-apt
|
||||
else
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt
|
||||
fi
|
||||
@@ -527,6 +530,8 @@ wo_travis_install() {
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.4.y#egg=python-apt
|
||||
elif [ "$wo_distro_codename" = "bullseye" ]; then
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt
|
||||
elif [ "$wo_distro_codename" = "bookworm" ]; then
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.5.3#egg=python-apt
|
||||
else
|
||||
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt
|
||||
fi
|
||||
|
||||
2
setup.py
2
setup.py
@@ -27,7 +27,7 @@ if os.geteuid() == 0:
|
||||
os.makedirs('/var/lib/wo/tmp/')
|
||||
|
||||
setup(name='wordops',
|
||||
version='3.16.3',
|
||||
version='3.17.0',
|
||||
description='An essential toolset that eases server administration',
|
||||
long_description=LONG,
|
||||
long_description_content_type='text/markdown',
|
||||
|
||||
@@ -29,7 +29,8 @@ def pre_pref(self, apt_packages):
|
||||
|
||||
if ("mariadb-server" in apt_packages or "mariadb-client" in apt_packages):
|
||||
# add mariadb repository excepted on raspbian and ubuntu 19.04
|
||||
if not WOVar.wo_distro == 'raspbian':
|
||||
if not (WOVar.wo_distro == 'raspbian' or
|
||||
WOVar.wo_platform_codename == 'bookworm'):
|
||||
Log.info(self, "Adding repository for MySQL, please wait...")
|
||||
mysql_pref = (
|
||||
"Package: *\nPin: origin mariadb.mirrors.ovh.net"
|
||||
@@ -125,13 +126,15 @@ def pre_pref(self, apt_packages):
|
||||
Log.debug(self, 'Adding ppa for nano')
|
||||
WORepo.add(self, ppa=WOVar.wo_ubuntu_backports)
|
||||
else:
|
||||
if (not WOFileUtils.grepcheck(
|
||||
self, '/etc/apt/sources.list/wo-repo.list',
|
||||
'WordOps')):
|
||||
Log.info(self, "Adding repository for Nano, please wait...")
|
||||
Log.debug(self, 'Adding repository for Nano')
|
||||
WORepo.add_key(self, WOVar.wo_nginx_key)
|
||||
WORepo.add(self, repo_url=WOVar.wo_nginx_repo)
|
||||
if WOVar.wo_platform_codename == 'buster':
|
||||
if (not WOFileUtils.grepcheck(
|
||||
self, '/etc/apt/sources.list/wo-repo.list',
|
||||
'WordOps')):
|
||||
Log.info(self,
|
||||
"Adding repository for Nano, please wait...")
|
||||
Log.debug(self, 'Adding repository for Nano')
|
||||
WORepo.add_key(self, WOVar.wo_nginx_key)
|
||||
WORepo.add(self, repo_url=WOVar.wo_nginx_repo)
|
||||
|
||||
|
||||
def post_pref(self, apt_packages, packages, upgrade=False):
|
||||
|
||||
@@ -148,7 +148,7 @@ class WOVar():
|
||||
.format(wo_deb_repo))
|
||||
|
||||
wo_nginx = ["nginx-custom", "nginx-wo"]
|
||||
wo_nginx_key = '188C9FB063F0247A'
|
||||
wo_nginx_key = 'FB898660'
|
||||
|
||||
wo_module = ["bcmath", "cli", "common", "curl", "fpm", "gd", "igbinary",
|
||||
"imagick", "imap", "intl", "mbstring", "memcached", "msgpack",
|
||||
@@ -211,7 +211,7 @@ class WOVar():
|
||||
wo_php_repo = (
|
||||
"deb https://packages.sury.org/php/ {codename} main"
|
||||
.format(codename=wo_platform_codename))
|
||||
wo_php_key = 'AC0E47584A7A714D'
|
||||
wo_php_key = '95BD4743'
|
||||
wo_redis_key_url = "https://packages.redis.io/gpg"
|
||||
wo_redis_repo = ("deb https://packages.redis.io/deb {codename} main"
|
||||
.format(codename=wo_platform_codename))
|
||||
|
||||
Reference in New Issue
Block a user