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