Merge pull request #656 from WordOps/updating-configuration

Fix netdata install/upgrade and wo info
This commit is contained in:
VirtuBox
2024-06-01 13:56:25 +02:00
committed by GitHub
8 changed files with 54 additions and 255 deletions

View File

@@ -40,7 +40,7 @@
- **Easy to install** : One step automated installer with migration from EasyEngine v3 support - **Easy to install** : One step automated installer with migration from EasyEngine v3 support
- **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation - **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation
- **Custom Nginx build** : Nginx 1.24.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support - **Custom Nginx build** : Nginx 1.24.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support
- **Up-to-date** : PHP 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 & 8.3 - MariaDB 10.11 LTS & Redis 7.0 - **Up-to-date** : PHP 7.4, 8.0, 8.1, 8.2 & 8.3 - MariaDB 10.11 LTS & Redis 7.0
- **Secured** : Hardened WordPress security with strict Nginx location directives - **Secured** : Hardened WordPress security with strict Nginx location directives
- **Powerful** : Optimized Nginx configurations with multiple cache backends support - **Powerful** : Optimized Nginx configurations with multiple cache backends support
- **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support - **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support
@@ -132,8 +132,6 @@ wo site create example.com --proxy=127.0.0.1:3000 # create example.com with ngi
### Switch between PHP versions ### Switch between PHP versions
```bash ```bash
wo site update example.com --php72 # switch to PHP 7.2
wo site update example.com --php73 # switch to PHP 7.3
wo site update example.com --php74 # switch to PHP 7.4 wo site update example.com --php74 # switch to PHP 7.4
wo site update example.com --php80 # switch to PHP 8.0 wo site update example.com --php80 # switch to PHP 8.0
wo site update example.com --php81 # switch to PHP 8.1 wo site update example.com --php81 # switch to PHP 8.1

View File

@@ -213,7 +213,7 @@ wo_install_dep() {
build-essential curl gzip python3-pip python3-apt python3-venv gcc python3-dev sqlite3 git tar software-properties-common pigz \ build-essential curl gzip python3-pip python3-apt python3-venv gcc python3-dev sqlite3 git tar software-properties-common pigz \
gnupg2 cron ccze rsync apt-transport-https tree haveged ufw unattended-upgrades tzdata ntp zstd idn \ gnupg2 cron ccze rsync apt-transport-https tree haveged ufw unattended-upgrades tzdata ntp zstd idn \
python3-distutils-extra libapt-pkg-dev bash-completion >/dev/null 2>&1 python3-distutils-extra libapt-pkg-dev bash-completion >/dev/null 2>&1
curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add - curl -fsSL https://build.opensuse.org/projects/home:virtubox/public_key | gpg --dearmor -o /usr/share/keyrings/wordops-archive-keyring.gpg
else else
# install dependencies # install dependencies
apt-get --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ apt-get --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \
@@ -221,9 +221,10 @@ wo_install_dep() {
software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw unattended-upgrades tzdata ntp zstd idn \ software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw unattended-upgrades tzdata ntp zstd idn \
python3-distutils-extra libapt-pkg-dev bash-completion >/dev/null 2>&1 python3-distutils-extra libapt-pkg-dev bash-completion >/dev/null 2>&1
# add php repository gpg key # add php repository gpg key
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; } curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
dpkg -i /tmp/debsuryorg-archive-keyring.deb && rm -f /tmp/debsuryorg-archive-keyring.deb
# add nginx repository gpg key # add nginx repository gpg key
curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add - curl -fsSL https://build.opensuse.org/projects/home:virtubox/public_key | gpg --dearmor -o /usr/share/keyrings/wordops-archive-keyring.gpg
fi fi
locale-gen en locale-gen en
# enable unattended upgades # enable unattended upgades

View File

@@ -69,176 +69,38 @@ class WOInfoController(CementBaseController):
@expose(hide=True) @expose(hide=True)
def info_php(self): def info_php(self):
"""Display PHP information""" """Display PHP information"""
version = os.popen("/usr/bin/php7.2 -v 2>/dev/null | " pargs = self.app.pargs
"head -n1 | cut -d' ' -f2 |" if WOAptGet.is_installed(self, 'php7.4-fpm'):
" cut -d'+' -f1 | tr -d '\n'").read pargs.php74 = True
config = configparser.ConfigParser()
config.read('/etc/{0}/fpm/php.ini'.format("php/7.2"))
expose_php = config['PHP']['expose_php']
memory_limit = config['PHP']['memory_limit']
post_max_size = config['PHP']['post_max_size']
upload_max_filesize = config['PHP']['upload_max_filesize']
max_execution_time = config['PHP']['max_execution_time']
if os.path.exists('/etc/php/7.2/fpm/pool.d/www.conf'):
config.read('/etc/php/7.2/fpm/pool.d/www.conf')
else: else:
Log.error(self, 'php-fpm pool config not found') Log.info(self, "PHP 7.4 is not installed")
if config.has_section('www'): if WOAptGet.is_installed(self, 'php8.0-fpm'):
wconfig = config['www'] pargs.php80 = True
elif config.has_section('www-php72'):
wconfig = config['www-php72']
else: else:
Log.error(self, 'Unable to parse configuration') Log.info(self, "PHP 8.0 is not installed")
www_listen = wconfig['listen'] if WOAptGet.is_installed(self, 'php8.1-fpm'):
www_ping_path = wconfig['ping.path'] pargs.php81 = True
www_pm_status_path = wconfig['pm.status_path']
www_pm = wconfig['pm']
www_pm_max_requests = wconfig['pm.max_requests']
www_pm_max_children = wconfig['pm.max_children']
www_pm_start_servers = wconfig['pm.start_servers']
www_pm_min_spare_servers = wconfig['pm.min_spare_servers']
www_pm_max_spare_servers = wconfig['pm.max_spare_servers']
www_request_terminate_time = (wconfig
['request_terminate_timeout'])
try:
www_xdebug = (
wconfig['php_admin_flag[xdebug.profiler_enable'
'_trigger]'])
except Exception as e:
Log.debug(self, "{0}".format(e))
www_xdebug = 'off'
config.read('/etc/{0}/fpm/pool.d/debug.conf'.format("php/7.2"))
debug_listen = config['debug']['listen']
debug_ping_path = config['debug']['ping.path']
debug_pm_status_path = config['debug']['pm.status_path']
debug_pm = config['debug']['pm']
debug_pm_max_requests = config['debug']['pm.max_requests']
debug_pm_max_children = config['debug']['pm.max_children']
debug_pm_start_servers = config['debug']['pm.start_servers']
debug_pm_min_spare_servers = config['debug']['pm.min_spare_servers']
debug_pm_max_spare_servers = config['debug']['pm.max_spare_servers']
debug_request_terminate = (config['debug']
['request_terminate_timeout'])
try:
debug_xdebug = (config['debug']['php_admin_flag[xdebug.profiler_'
'enable_trigger]'])
except Exception as e:
Log.debug(self, "{0}".format(e))
debug_xdebug = 'off'
data = dict(version=version, expose_php=expose_php,
memory_limit=memory_limit, post_max_size=post_max_size,
upload_max_filesize=upload_max_filesize,
max_execution_time=max_execution_time,
www_listen=www_listen, www_ping_path=www_ping_path,
www_pm_status_path=www_pm_status_path, www_pm=www_pm,
www_pm_max_requests=www_pm_max_requests,
www_pm_max_children=www_pm_max_children,
www_pm_start_servers=www_pm_start_servers,
www_pm_min_spare_servers=www_pm_min_spare_servers,
www_pm_max_spare_servers=www_pm_max_spare_servers,
www_request_terminate_timeout=www_request_terminate_time,
www_xdebug_profiler_enable_trigger=www_xdebug,
debug_listen=debug_listen, debug_ping_path=debug_ping_path,
debug_pm_status_path=debug_pm_status_path,
debug_pm=debug_pm,
debug_pm_max_requests=debug_pm_max_requests,
debug_pm_max_children=debug_pm_max_children,
debug_pm_start_servers=debug_pm_start_servers,
debug_pm_min_spare_servers=debug_pm_min_spare_servers,
debug_pm_max_spare_servers=debug_pm_max_spare_servers,
debug_request_terminate_timeout=debug_request_terminate,
debug_xdebug_profiler_enable_trigger=debug_xdebug)
self.app.render((data), 'info_php.mustache')
@expose(hide=True)
def info_php73(self):
"""Display PHP information"""
version = os.popen("/usr/bin/php7.3 -v 2>/dev/null | "
"head -n1 | cut -d' ' -f2 |"
" cut -d'+' -f1 | tr -d '\n'").read
config = configparser.ConfigParser()
config.read('/etc/php/7.3/fpm/php.ini')
expose_php = config['PHP']['expose_php']
memory_limit = config['PHP']['memory_limit']
post_max_size = config['PHP']['post_max_size']
upload_max_filesize = config['PHP']['upload_max_filesize']
max_execution_time = config['PHP']['max_execution_time']
if os.path.exists('/etc/php/7.3/fpm/pool.d/www.conf'):
config.read('/etc/php/7.3/fpm/pool.d/www.conf')
else: else:
Log.error(self, 'php-fpm pool config not found') Log.info(self, "PHP 8.1 is not installed")
if config.has_section('www'): if WOAptGet.is_installed(self, 'php8.2-fpm'):
wconfig = config['www'] pargs.php82 = True
elif config.has_section('www-php73'):
wconfig = config['www-php73']
else: else:
Log.error(self, 'Unable to parse configuration') Log.info(self, "PHP 8.2 is not installed")
www_listen = wconfig['listen'] if WOAptGet.is_installed(self, 'php8.3-fpm'):
www_ping_path = wconfig['ping.path'] pargs.php83 = True
www_pm_status_path = wconfig['pm.status_path'] else:
www_pm = wconfig['pm'] Log.info(self, "PHP 8.3 is not installed")
www_pm_max_requests = wconfig['pm.max_requests']
www_pm_max_children = wconfig['pm.max_children']
www_pm_start_servers = wconfig['pm.start_servers']
www_pm_min_spare_servers = wconfig['pm.min_spare_servers']
www_pm_max_spare_servers = wconfig['pm.max_spare_servers']
www_request_terminate_time = (wconfig
['request_terminate_timeout'])
try:
www_xdebug = (wconfig
['php_admin_flag[xdebug.profiler_enable'
'_trigger]'])
except Exception as e:
Log.debug(self, "{0}".format(e))
www_xdebug = 'off'
config.read('/etc/php/7.3/fpm/pool.d/debug.conf') if pargs.php74:
debug_listen = config['debug']['listen'] self.info_php74()
debug_ping_path = config['debug']['ping.path'] if pargs.php80:
debug_pm_status_path = config['debug']['pm.status_path'] self.info_php80()
debug_pm = config['debug']['pm'] if pargs.php81:
debug_pm_max_requests = config['debug']['pm.max_requests'] self.info_php81()
debug_pm_max_children = config['debug']['pm.max_children'] if pargs.php82:
debug_pm_start_servers = config['debug']['pm.start_servers'] self.info_php82()
debug_pm_min_spare_servers = config['debug']['pm.min_spare_servers'] if pargs.php83:
debug_pm_max_spare_servers = config['debug']['pm.max_spare_servers'] self.info_php83()
debug_request_terminate = (config['debug']
['request_terminate_timeout'])
try:
debug_xdebug = (config['debug']['php_admin_flag[xdebug.profiler_'
'enable_trigger]'])
except Exception as e:
Log.debug(self, "{0}".format(e))
debug_xdebug = 'off'
data = dict(version=version, expose_php=expose_php,
memory_limit=memory_limit, post_max_size=post_max_size,
upload_max_filesize=upload_max_filesize,
max_execution_time=max_execution_time,
www_listen=www_listen, www_ping_path=www_ping_path,
www_pm_status_path=www_pm_status_path, www_pm=www_pm,
www_pm_max_requests=www_pm_max_requests,
www_pm_max_children=www_pm_max_children,
www_pm_start_servers=www_pm_start_servers,
www_pm_min_spare_servers=www_pm_min_spare_servers,
www_pm_max_spare_servers=www_pm_max_spare_servers,
www_request_terminate_timeout=www_request_terminate_time,
www_xdebug_profiler_enable_trigger=www_xdebug,
debug_listen=debug_listen, debug_ping_path=debug_ping_path,
debug_pm_status_path=debug_pm_status_path,
debug_pm=debug_pm,
debug_pm_max_requests=debug_pm_max_requests,
debug_pm_max_children=debug_pm_max_children,
debug_pm_start_servers=debug_pm_start_servers,
debug_pm_min_spare_servers=debug_pm_min_spare_servers,
debug_pm_max_spare_servers=debug_pm_max_spare_servers,
debug_request_terminate_timeout=debug_request_terminate,
debug_xdebug_profiler_enable_trigger=debug_xdebug)
self.app.render((data), 'info_php.mustache')
@expose(hide=True) @expose(hide=True)
def info_php74(self): def info_php74(self):
@@ -714,24 +576,11 @@ class WOInfoController(CementBaseController):
"""default function for info""" """default function for info"""
pargs = self.app.pargs pargs = self.app.pargs
if (not pargs.nginx and not pargs.php and if (not pargs.nginx and not pargs.php and
not pargs.mysql and not pargs.php73 and not pargs.mysql and not pargs.php74 and not pargs.php80 and
not pargs.php74 and not pargs.php80 and not pargs.php81 and not pargs.php82 and not pargs.php83):
not pargs.php81 and not pargs.php82) and not (pargs.php83):
pargs.nginx = True pargs.nginx = True
pargs.php = True
pargs.mysql = True pargs.mysql = True
if WOAptGet.is_installed(self, 'php7.3-fpm'): pargs.php = True
pargs.php73 = True
if WOAptGet.is_installed(self, 'php7.4-fpm'):
pargs.php74 = True
if WOAptGet.is_installed(self, 'php8.0-fpm'):
pargs.php80 = True
if WOAptGet.is_installed(self, 'php8.1-fpm'):
pargs.php81 = True
if WOAptGet.is_installed(self, 'php8.2-fpm'):
pargs.php82 = True
if WOAptGet.is_installed(self, 'php8.3-fpm'):
pargs.php83 = True
if pargs.nginx: if pargs.nginx:
if ((not WOAptGet.is_installed(self, 'nginx-custom')) and if ((not WOAptGet.is_installed(self, 'nginx-custom')) and
@@ -741,46 +590,7 @@ class WOInfoController(CementBaseController):
self.info_nginx() self.info_nginx()
if pargs.php: if pargs.php:
if WOAptGet.is_installed(self, 'php7.2-fpm'): self.info_php()
self.info_php()
else:
Log.info(self, "PHP 7.2 is not installed")
if pargs.php73:
if WOAptGet.is_installed(self, 'php7.3-fpm'):
self.info_php73()
else:
Log.info(self, "PHP 7.3 is not installed")
if pargs.php74:
if WOAptGet.is_installed(self, 'php7.4-fpm'):
self.info_php74()
else:
Log.info(self, "PHP 7.4 is not installed")
if pargs.php80:
if WOAptGet.is_installed(self, 'php8.0-fpm'):
self.info_php80()
else:
Log.info(self, "PHP 8.0 is not installed")
if pargs.php81:
if WOAptGet.is_installed(self, 'php8.1-fpm'):
self.info_php81()
else:
Log.info(self, "PHP 8.1 is not installed")
if pargs.php82:
if WOAptGet.is_installed(self, 'php8.2-fpm'):
self.info_php82()
else:
Log.info(self, "PHP 8.2 is not installed")
if pargs.php83:
if WOAptGet.is_installed(self, 'php8.3-fpm'):
self.info_php83()
else:
Log.info(self, "PHP 8.3 is not installed")
if pargs.mysql: if pargs.mysql:
if WOShellExec.cmd_exec(self, "/usr/bin/mysqladmin ping"): if WOShellExec.cmd_exec(self, "/usr/bin/mysqladmin ping"):

View File

@@ -910,10 +910,7 @@ def site_package_check(self, stype):
if stype in ['wp', 'wpsubdir', 'wpsubdomain']: if stype in ['wp', 'wpsubdir', 'wpsubdomain']:
Log.debug(self, "Setting packages variable for WP-CLI") Log.debug(self, "Setting packages variable for WP-CLI")
if not WOAptGet.is_exec(self, "wp"): if not WOAptGet.is_exec(self, "wp"):
packages = packages + [["https://github.com/wp-cli/wp-cli/" packages = packages + [[f"{WOVar.wpcli_url}",
"releases/download/v{0}/"
"wp-cli-{0}.phar"
.format(WOVar.wo_wp_cli),
"/usr/local/bin/wp", "WP-CLI"]] "/usr/local/bin/wp", "WP-CLI"]]
if pargs.wpredis: if pargs.wpredis:
Log.debug(self, "Setting apt_packages variable for redis") Log.debug(self, "Setting apt_packages variable for redis")

View File

@@ -223,10 +223,7 @@ class WOStackController(CementBaseController):
if pargs.wpcli: if pargs.wpcli:
Log.debug(self, "Setting packages variable for WP-CLI") Log.debug(self, "Setting packages variable for WP-CLI")
if not WOAptGet.is_exec(self, 'wp'): if not WOAptGet.is_exec(self, 'wp'):
packages = packages + [["https://github.com/wp-cli/wp-cli/" packages = packages + [[f"{WOVar.wpcli_url}"
"releases/download/v{0}/"
"wp-cli-{0}.phar"
"".format(WOVar.wo_wp_cli),
"/usr/local/bin/wp", "/usr/local/bin/wp",
"WP-CLI"]] "WP-CLI"]]
else: else:
@@ -371,8 +368,7 @@ class WOStackController(CementBaseController):
os.path.isdir("/etc/netdata")): os.path.isdir("/etc/netdata")):
Log.debug( Log.debug(
self, "Setting packages variable for Netdata") self, "Setting packages variable for Netdata")
packages = packages + [['https://my-netdata.io/' packages = packages + [[f"{WOVar.netdata_script_url}",
'kickstart.sh',
'/var/lib/wo/tmp/kickstart.sh', '/var/lib/wo/tmp/kickstart.sh',
'Netdata']] 'Netdata']]
else: else:

View File

@@ -1152,25 +1152,18 @@ def post_pref(self, apt_packages, packages, upgrade=False):
Log.wait(self, "Installing Netdata") Log.wait(self, "Installing Netdata")
WOShellExec.cmd_exec( WOShellExec.cmd_exec(
self, "bash /var/lib/wo/tmp/kickstart.sh " self, "bash /var/lib/wo/tmp/kickstart.sh "
"--dont-wait --no-updates --stable-channel " "--dont-wait --stable-channel",
"--reinstall-even-if-unsafe",
errormsg='', log=False) errormsg='', log=False)
Log.valide(self, "Installing Netdata") Log.valide(self, "Installing Netdata")
# disable mail notifications # disable mail notifications
if os.path.isdir('/usr/lib/netdata/conf.d/health_alarm_notify.conf'): if os.path.exists('/usr/lib/netdata/conf.d/health_alarm_notify.conf'):
WOFileUtils.searchreplace( WOFileUtils.searchreplace(
self, "/usr/lib/netdata/conf.d/health_alarm_notify.conf", self, "/usr/lib/netdata/conf.d/health_alarm_notify.conf",
'SEND_EMAIL="YES"', 'SEND_EMAIL="YES"',
'SEND_EMAIL="NO"') 'SEND_EMAIL="NO"')
if os.path.isdir('/opt/netdata/etc/netdata/health_alarm_notify.conf'): if os.path.exists('/etc/netdata/orig/health_alarm_notify.conf'):
WOFileUtils.searchreplace(
self, "/opt/netdata/etc/netdata/health_alarm_notify.conf",
'SEND_EMAIL="YES"',
'SEND_EMAIL="NO"')
if os.path.isdir('/etc/netdata/orig/health_alarm_notify.conf'):
WOFileUtils.searchreplace( WOFileUtils.searchreplace(
self, "/etc/netdata/orig/health_alarm_notify.conf", self, "/etc/netdata/orig/health_alarm_notify.conf",
'SEND_EMAIL="YES"', 'SEND_EMAIL="YES"',

View File

@@ -168,12 +168,9 @@ class WOStackUpgradeController(CementBaseController):
# wp-cli # wp-cli
if pargs.wpcli: if pargs.wpcli:
if os.path.isfile('/usr/local/bin/wp'): if os.path.isfile('/usr/local/bin/wp'):
packages = packages + [[ packages = packages + [[f"{WOVar.wpcli_url}",
"https://github.com/wp-cli/wp-cli/" "/usr/local/bin/wp",
"releases/download/v{0}/" "WP-CLI"]]
"wp-cli-{0}.phar".format(WOVar.wo_wp_cli),
"/usr/local/bin/wp",
"WP-CLI"]]
else: else:
Log.info(self, "WPCLI is not installed with WordOps") Log.info(self, "WPCLI is not installed with WordOps")
@@ -183,7 +180,7 @@ class WOStackUpgradeController(CementBaseController):
if (os.path.isdir('/opt/netdata') or if (os.path.isdir('/opt/netdata') or
os.path.isdir('/etc/netdata')): os.path.isdir('/etc/netdata')):
packages = packages + [[ packages = packages + [[
'https://my-netdata.io/kickstart.sh', f"{WOVar.netdata_script_url}",
'/var/lib/wo/tmp/kickstart.sh', 'Netdata']] '/var/lib/wo/tmp/kickstart.sh', 'Netdata']]
else: else:
Log.info(self, 'Netdata is not installed') Log.info(self, 'Netdata is not installed')
@@ -356,6 +353,11 @@ class WOStackUpgradeController(CementBaseController):
# Netdata # Netdata
if WOAptGet.is_selected(self, 'Netdata', packages): if WOAptGet.is_selected(self, 'Netdata', packages):
WOService.stop_service(self, 'netdata') WOService.stop_service(self, 'netdata')
if os.path.exists('/opt/netdata/usr/libexec/netdata/netdata-uninstaller.sh'):
WOShellExec.cmd_exec(self,
"/opt/netdata/usr/libexec/"
"netdata/netdata-uninstaller.sh --yes --force",
log=False)
Log.wait(self, "Upgrading Netdata") Log.wait(self, "Upgrading Netdata")
# detect static binaries install # detect static binaries install
WOShellExec.cmd_exec( WOShellExec.cmd_exec(

View File

@@ -17,13 +17,13 @@ class WOVar():
# WordOps version # WordOps version
wo_version = "3.21.0" wo_version = "3.21.0"
# WordOps packages versions # WordOps packages versions
wo_wp_cli = "2.10.0"
wo_adminer = "4.8.1" wo_adminer = "4.8.1"
wo_phpmyadmin = "5.2.0" wo_phpmyadmin = "5.2.0"
wo_extplorer = "2.1.15" wo_extplorer = "2.1.15"
wo_dashboard = "1.3" wo_dashboard = "1.3"
# Get WPCLI path # Get WPCLI path
wpcli_url = "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
wo_wpcli_path = '/usr/local/bin/wp' wo_wpcli_path = '/usr/local/bin/wp'
# Current date and time of System # Current date and time of System
@@ -211,6 +211,8 @@ class WOVar():
wo_redis = ['redis-server'] wo_redis = ['redis-server']
netdata_script_url = "https://get.netdata.cloud/kickstart.sh"
# Repo path # Repo path
wo_repo_file = "wo-repo.list" wo_repo_file = "wo-repo.list"
wo_repo_file_path = ("/etc/apt/sources.list.d/" + wo_repo_file) wo_repo_file_path = ("/etc/apt/sources.list.d/" + wo_repo_file)