Full Code of omega8cc/boa for AI

5.x-dev 0daf1f2a4803 cached
616 files
9.6 MB
2.6M tokens
2 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (10,213K chars total). Download the full file to get everything.
Repository: omega8cc/boa
Branch: 5.x-dev
Commit: 0daf1f2a4803
Files: 616
Total size: 9.6 MB

Directory structure:
gitextract_47j2j2qw/

├── .gitignore
├── ANNOUNCEMENT.md
├── BARRACUDA.sh.txt
├── BOA.sh.txt
├── CHANGELOG.txt
├── DIFFERENT30Y.md
├── DUALLICENSE.md
├── HTTP3.md
├── OCTOPUS.sh.txt
├── README.md
├── ROADMAP.md
├── aegir/
│   ├── conf/
│   │   ├── apparmor/
│   │   │   ├── opt.php56.bin.php
│   │   │   ├── opt.php56.sbin.php-fpm
│   │   │   ├── opt.php70.bin.php
│   │   │   ├── opt.php70.sbin.php-fpm
│   │   │   ├── opt.php71.bin.php
│   │   │   ├── opt.php71.sbin.php-fpm
│   │   │   ├── opt.php72.bin.php
│   │   │   ├── opt.php72.sbin.php-fpm
│   │   │   ├── opt.php73.bin.php
│   │   │   ├── opt.php73.sbin.php-fpm
│   │   │   ├── opt.php74.bin.php
│   │   │   ├── opt.php74.sbin.php-fpm
│   │   │   ├── opt.php80.bin.php
│   │   │   ├── opt.php80.sbin.php-fpm
│   │   │   ├── opt.php81.bin.php
│   │   │   ├── opt.php81.sbin.php-fpm
│   │   │   ├── opt.php82.bin.php
│   │   │   ├── opt.php82.sbin.php-fpm
│   │   │   ├── opt.php83.bin.php
│   │   │   ├── opt.php83.sbin.php-fpm
│   │   │   ├── opt.php84.bin.php
│   │   │   ├── opt.php84.sbin.php-fpm
│   │   │   ├── opt.php85.bin.php
│   │   │   ├── opt.php85.sbin.php-fpm
│   │   │   ├── sbin.dhclient
│   │   │   ├── usr.bin.chromium
│   │   │   ├── usr.bin.freshclam
│   │   │   ├── usr.bin.man
│   │   │   ├── usr.bin.mysecureshell
│   │   │   ├── usr.bin.mysql
│   │   │   ├── usr.bin.mysqld_safe
│   │   │   ├── usr.bin.newrelic-daemon
│   │   │   ├── usr.bin.node
│   │   │   ├── usr.bin.redis-server
│   │   │   ├── usr.bin.valkey-server
│   │   │   ├── usr.local.bin.lshell
│   │   │   ├── usr.local.bin.ssh
│   │   │   ├── usr.local.bin.wkhtmltoimage
│   │   │   ├── usr.local.bin.wkhtmltopdf
│   │   │   ├── usr.local.sbin.pure-ftpd
│   │   │   ├── usr.local.sbin.sshd
│   │   │   ├── usr.sbin.clamd
│   │   │   ├── usr.sbin.mysqld
│   │   │   ├── usr.sbin.nginx
│   │   │   ├── usr.sbin.rsyslogd
│   │   │   └── usr.sbin.unbound
│   │   ├── dns/
│   │   │   ├── unbound
│   │   │   ├── unbound-helper
│   │   │   └── unbound.conf
│   │   ├── droplet/
│   │   │   └── droplet-agent
│   │   ├── etc/
│   │   │   └── etc-ImageMagick-6-policy.xml
│   │   ├── ftpd/
│   │   │   ├── ftpusers
│   │   │   ├── pure-config.pl.txt
│   │   │   └── pure-ftpd.conf
│   │   ├── global/
│   │   │   ├── global-10.inc
│   │   │   ├── global-11.inc
│   │   │   ├── global-6.inc
│   │   │   ├── global-7.inc
│   │   │   ├── global-8.inc
│   │   │   ├── global-9.inc
│   │   │   ├── global-extra.inc
│   │   │   ├── global-front-end.inc
│   │   │   ├── global-if-redis.inc
│   │   │   ├── global-if-valkey.inc
│   │   │   ├── global-ini.inc
│   │   │   ├── global-main.inc
│   │   │   ├── global-mode.inc
│   │   │   ├── global-newrelic.inc
│   │   │   ├── global-redis.inc
│   │   │   ├── global-settings.inc
│   │   │   ├── global-valkey.inc
│   │   │   ├── global.inc
│   │   │   ├── override.global.inc
│   │   │   └── settings.global.inc
│   │   ├── ini/
│   │   │   ├── default.boa_platform_control.ini
│   │   │   ├── default.boa_site_control.ini
│   │   │   └── panels.ini
│   │   ├── network/
│   │   │   └── networking
│   │   ├── nginx/
│   │   │   ├── fastcgi_params.txt
│   │   │   ├── mime.types
│   │   │   ├── nginx
│   │   │   ├── nginx-squeeze-init
│   │   │   ├── nginx.conf
│   │   │   ├── nginx_compact_include.conf
│   │   │   ├── nginx_high_load_off.conf
│   │   │   ├── nginx_speed_purge.conf
│   │   │   ├── nginx_sql_adminer.conf
│   │   │   ├── nginx_sql_buddy.conf
│   │   │   ├── nginx_sql_cgp.conf
│   │   │   ├── nginx_sql_chive.conf
│   │   │   └── nginx_wild_ssl.conf
│   │   ├── php/
│   │   │   ├── fpm-pool-common-legacy.conf
│   │   │   ├── fpm-pool-common-modern.conf
│   │   │   ├── fpm-pool-common.conf
│   │   │   ├── fpm-pool-foo-multi.conf
│   │   │   ├── fpm-pool-foo.conf
│   │   │   ├── fpm56-pool-www.conf
│   │   │   ├── fpm70-pool-www.conf
│   │   │   ├── fpm71-pool-www.conf
│   │   │   ├── fpm72-pool-www.conf
│   │   │   ├── fpm73-pool-www.conf
│   │   │   ├── fpm74-pool-www.conf
│   │   │   ├── fpm80-pool-www.conf
│   │   │   ├── fpm81-pool-www.conf
│   │   │   ├── fpm82-pool-www.conf
│   │   │   ├── fpm83-pool-www.conf
│   │   │   ├── fpm84-pool-www.conf
│   │   │   ├── fpm85-pool-www.conf
│   │   │   ├── newrelic.ini
│   │   │   ├── php56-cli.ini
│   │   │   ├── php56-fpm
│   │   │   ├── php56-fpm.conf
│   │   │   ├── php56.ini
│   │   │   ├── php70-cli.ini
│   │   │   ├── php70-fpm
│   │   │   ├── php70-fpm.conf
│   │   │   ├── php70.ini
│   │   │   ├── php71-cli.ini
│   │   │   ├── php71-fpm
│   │   │   ├── php71-fpm.conf
│   │   │   ├── php71.ini
│   │   │   ├── php72-cli.ini
│   │   │   ├── php72-fpm
│   │   │   ├── php72-fpm.conf
│   │   │   ├── php72.ini
│   │   │   ├── php73-cli.ini
│   │   │   ├── php73-fpm
│   │   │   ├── php73-fpm.conf
│   │   │   ├── php73.ini
│   │   │   ├── php74-cli.ini
│   │   │   ├── php74-fpm
│   │   │   ├── php74-fpm.conf
│   │   │   ├── php74.ini
│   │   │   ├── php80-cli.ini
│   │   │   ├── php80-fpm
│   │   │   ├── php80-fpm.conf
│   │   │   ├── php80.ini
│   │   │   ├── php81-cli.ini
│   │   │   ├── php81-fpm
│   │   │   ├── php81-fpm.conf
│   │   │   ├── php81.ini
│   │   │   ├── php82-cli.ini
│   │   │   ├── php82-fpm
│   │   │   ├── php82-fpm.conf
│   │   │   ├── php82.ini
│   │   │   ├── php83-cli.ini
│   │   │   ├── php83-fpm
│   │   │   ├── php83-fpm.conf
│   │   │   ├── php83.ini
│   │   │   ├── php84-cli.ini
│   │   │   ├── php84-fpm
│   │   │   ├── php84-fpm.conf
│   │   │   ├── php84.ini
│   │   │   ├── php85-cli.ini
│   │   │   ├── php85-fpm
│   │   │   ├── php85-fpm.conf
│   │   │   └── php85.ini
│   │   ├── redis/
│   │   │   ├── redis-server
│   │   │   ├── redis.conf
│   │   │   ├── redis4.conf
│   │   │   ├── redis5.conf
│   │   │   ├── redis6.conf
│   │   │   └── redis7.conf
│   │   ├── solr9/
│   │   │   ├── analysis-extras.mod
│   │   │   ├── analytics.mod
│   │   │   ├── clustering.mod
│   │   │   ├── cross-dc.mod
│   │   │   ├── extraction.mod
│   │   │   ├── gcs-repository.mod
│   │   │   ├── hadoop-auth.mod
│   │   │   ├── hdfs.mod
│   │   │   ├── jaegertracer-configurator.mod
│   │   │   ├── jwt-auth.mod
│   │   │   ├── langid.mod
│   │   │   ├── llm.mod
│   │   │   ├── ltr.mod
│   │   │   ├── opentelemetry.mod
│   │   │   ├── s3-repository.mod
│   │   │   ├── scripting.mod
│   │   │   └── sql.mod
│   │   ├── tpl/
│   │   │   ├── migration.html
│   │   │   ├── robots.txt
│   │   │   ├── setupmail.txt
│   │   │   ├── uc.html
│   │   │   └── upgrademail.txt
│   │   ├── valkey/
│   │   │   ├── valkey-server
│   │   │   ├── valkey7.conf
│   │   │   ├── valkey8.conf
│   │   │   └── valkey9.conf
│   │   ├── var/
│   │   │   ├── boa.bashrc.txt
│   │   │   ├── clean-boa-env
│   │   │   ├── crossdomain.xml
│   │   │   ├── csf.conf
│   │   │   ├── galera.cnf
│   │   │   ├── get.htaccess.txt
│   │   │   ├── logrotate.d.rsyslog.conf
│   │   │   ├── my.cnf.txt
│   │   │   ├── mysql
│   │   │   ├── mysql-notices.conf
│   │   │   ├── named.conf.options
│   │   │   ├── rsyslog.conf
│   │   │   ├── sftp_config
│   │   │   ├── ssh_config
│   │   │   ├── sshd_config
│   │   │   └── sysctl.conf
│   │   └── version/
│   │       ├── barracuda-release.txt
│   │       ├── barracuda-version.txt
│   │       ├── octopus-release.txt
│   │       ├── octopus-version.txt
│   │       ├── release.txt
│   │       └── version.txt
│   ├── helpers/
│   │   ├── Gemfile.txt
│   │   ├── apt-list-debian.txt
│   │   ├── apt.conf.noi.dist
│   │   ├── apt.conf.noi.nrml
│   │   ├── apt.conf.noninteractive
│   │   ├── cf-simple-hook.sh
│   │   ├── challenge-dns-email-hook.sh
│   │   ├── dehydrated
│   │   ├── dump_cdorked_config.c
│   │   ├── fix-fstab-to-uuid.sh
│   │   ├── hosting_cron.sql
│   │   ├── le-hook.sh
│   │   ├── make_client.php.txt
│   │   ├── make_client_3.php.txt
│   │   ├── make_home.php.txt
│   │   ├── make_platform.php.txt
│   │   ├── make_platform_3.php.txt
│   │   ├── mysql_root_pass_reset.sh
│   │   ├── mysqltuner5
│   │   ├── mysqltuner8
│   │   ├── rtoc.php.txt
│   │   ├── spinner
│   │   ├── systemtime
│   │   └── websh.sh.txt
│   ├── makefiles/
│   │   ├── civicrm-4.5-d6.make
│   │   ├── civicrm-4.5-d7.make
│   │   ├── civicrm-4.6-d6.make
│   │   ├── civicrm-4.6-d7.make
│   │   ├── civicrm-4.7-d6.make
│   │   ├── civicrm-4.7-d7.make
│   │   ├── civicrm-5.0-d6.make
│   │   ├── civicrm-5.0-d7.make
│   │   ├── civicrm-5.1-d7.make
│   │   ├── civicrm-5.2-d7.make
│   │   ├── civicrm-5.3-d7.make
│   │   ├── civicrm-5.35-d7.make
│   │   └── civicrm-5.9-d7.make
│   ├── patches/
│   │   ├── 0001-Print-site_footer-if-defined.patch
│   │   ├── 2106995-fatal-error-non-object-1.patch
│   │   ├── 6-core/
│   │   │   ├── SA-CORE-2018-002-D6.patch
│   │   │   ├── SA-CORE-2018-004-D6.patch
│   │   │   └── patch_commit_7a847db99f80.patch
│   │   ├── 7-core/
│   │   │   ├── 3143016-83-D7.patch
│   │   │   ├── SA-CORE-2014-005-D7.patch
│   │   │   ├── SA-CORE-2018-002-D7.patch
│   │   │   ├── SA-CORE-2018-004-D7.patch
│   │   │   ├── SA-CORE-2018-006-D7.patch
│   │   │   ├── drupal-2656548-21-php7.patch
│   │   │   └── patch_commit_b8a8a84ea9b3.patch
│   │   ├── 8-core/
│   │   │   ├── 0001-Symlink-core-support-test.patch
│   │   │   ├── SA-CORE-2018-002-D8.patch
│   │   │   ├── SA-CORE-2018-004-D8.patch
│   │   │   └── SA-CORE-2018-006-D8.patch
│   │   ├── 992540-3-reset_flood_limit_on_password_reset-drush.patch
│   │   ├── MailManagerReplacement.php.patch
│   │   ├── PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch
│   │   ├── activity.patch
│   │   ├── apps_msg.patch
│   │   ├── bug62886.patch
│   │   ├── civicrm.drush.inc.patch.txt
│   │   ├── civicrm_engage.install
│   │   ├── commerce_kickstart.patch
│   │   ├── commons-1045778-fix-aegir-installs.patch
│   │   ├── commons-1060250-aegir-infinite-loop.patch
│   │   ├── commons_chicken_egg.patch
│   │   ├── disable_SSLv2_for_openssl_1_0_0.patch
│   │   ├── drupal-eleven-aegir-console-02.patch
│   │   ├── drupal-eleven-aegir-core-01.patch
│   │   ├── drupal-eleven-aegir-validator-03.patch
│   │   ├── drupal-ten-aegir-console-02.patch
│   │   ├── drupal-ten-aegir-core-01.patch
│   │   ├── drush-remote_make_files.patch
│   │   ├── drush_make-drush-4.x-fix-do7-compatibility.patch
│   │   ├── drush_make.drush.inc.patch
│   │   ├── features-1265168-19-roles.patch
│   │   ├── field_info_collate_fields-1400256-25.patch
│   │   ├── fpm_main.c.patch
│   │   ├── freetype.patch
│   │   ├── hosting_advanced_cron.patch
│   │   ├── hosting_cron.module
│   │   ├── hosting_cron_queue-reliability.patch
│   │   ├── hosting_le_vhost.drush.inc
│   │   ├── imagecache-1243258-5.patch
│   │   ├── imagefield_crop.patch
│   │   ├── julio_profile.patch
│   │   ├── my_config.h.patch
│   │   ├── mysql.provision.patch
│   │   ├── nik.patch
│   │   ├── object_conversion_menu_router_build-972536-1.patch
│   │   ├── octopus_video.patch
│   │   ├── og_update_6205_commons_fix.patch
│   │   ├── openacademy-search-off.patch
│   │   ├── openacademy.patch
│   │   ├── openaid-tpl.patch
│   │   ├── openenterprise.patch
│   │   ├── openoutreach.patch
│   │   ├── openpublic.patch
│   │   ├── openscholar.profile.patch
│   │   ├── openscholar_projects.profile.patch
│   │   ├── panopoly-search-off.patch
│   │   ├── panopoly-search-redis.patch
│   │   ├── patch_commit_6fabd31b0f81.patch
│   │   ├── patch_commit_fa47bad85589.patch
│   │   ├── php-8.1-openssl3.patch
│   │   ├── provision/
│   │   │   └── patch_commit_e4abc685f9b4.patch
│   │   ├── provision_hosting_le.drush.inc
│   │   ├── remove_usr1_usr2_fpm_unix.patch
│   │   ├── restaurant_demo.patch
│   │   ├── singular.mft.patch
│   │   ├── singular.patch
│   │   ├── skwashd.commons.patch
│   │   ├── taxonomy-6.20.patch
│   │   ├── taxonomy-6.26.patch
│   │   ├── taxonomy-7.12.patch
│   │   ├── taxonomy-7.7.patch
│   │   ├── ubercart-1167276-reroll.patch
│   │   ├── user.drush.inc.patch
│   │   ├── videola.patch
│   │   ├── views-853864_2.patch
│   │   ├── views-exposed-sorts-2037469-1.patch
│   │   ├── views-revert-broken-filter-or-groups-1766338-7.patch
│   │   └── views-unpack_options-cache-6.2-51.patch
│   ├── scripts/
│   │   ├── AegirSetupA.sh.txt
│   │   ├── AegirSetupB.sh.txt
│   │   ├── AegirSetupC.sh.txt
│   │   ├── AegirSetupM.sh.txt
│   │   ├── AegirUpgrade.sh.txt
│   │   └── run-xdrago
│   └── tools/
│       ├── BOND.sh.txt
│       ├── backup/
│       │   └── run/
│       │       ├── create_config_readme.sh
│       │       ├── create_credentials_templates.sh
│       │       ├── create_cron_entries.sh
│       │       ├── create_global_paths_config.sh
│       │       ├── create_readme.sh
│       │       ├── create_user_paths_config.sh
│       │       ├── duplicity_backup.sh
│       │       ├── duplicity_bundle_installer.sh
│       │       └── install_dependencies.sh
│       ├── bin/
│       │   ├── aptcleanup
│       │   ├── aptfast
│       │   ├── autobeowulf
│       │   ├── autochimaera
│       │   ├── autodaedalus
│       │   ├── autoexcalibur
│       │   ├── autoinit
│       │   ├── automini
│       │   ├── autosymlink
│       │   ├── autoupboa
│       │   ├── backboa
│       │   ├── backchain
│       │   ├── barracuda
│       │   ├── boa
│       │   ├── cluster
│       │   ├── codebasecheck
│       │   ├── copydbackup
│       │   ├── dcysetup
│       │   ├── dhcpfix
│       │   ├── duobackboa
│       │   ├── fancynow
│       │   ├── ffdevuan
│       │   ├── ffmirror
│       │   ├── fix-drupal-platform-ownership.sh
│       │   ├── fix-drupal-platform-permissions.sh
│       │   ├── fix-drupal-site-ownership.sh
│       │   ├── fix-drupal-site-permissions.sh
│       │   ├── fixmounts
│       │   ├── fixrepo
│       │   ├── killer
│       │   ├── loadguard
│       │   ├── lock-local-drush-permissions.sh
│       │   ├── lock.inc
│       │   ├── memorytuner
│       │   ├── mergecsf
│       │   ├── multiback
│       │   ├── mybackup
│       │   ├── mycnfup
│       │   ├── octopus
│       │   ├── perftest
│       │   ├── proxysql_galera_checker
│       │   ├── proxysql_node_monitor
│       │   ├── randpass
│       │   ├── renameaegirhost
│       │   ├── screenfetch
│       │   ├── setprio
│       │   ├── showdepend
│       │   ├── smtpgapps
│       │   ├── sqlclean
│       │   ├── sqlmagic
│       │   ├── syncpass
│       │   ├── synproxy
│       │   ├── synproxy_hook_fix
│       │   ├── synproxy_monitor
│       │   ├── synproxy_reassert
│       │   ├── synproxy_rollback
│       │   ├── synproxy_snapshot
│       │   ├── synproxy_status
│       │   ├── thinkdifferent
│       │   ├── updatesymlinks
│       │   ├── verifyvhostsdns
│       │   ├── vhostcheck
│       │   ├── vmnetfix
│       │   ├── weblogx
│       │   ├── webserver
│       │   ├── websh
│       │   ├── xboa
│       │   └── xcopy
│       ├── host/
│       │   ├── host-fire.sh
│       │   └── host-water.sh
│       └── system/
│           ├── checksql.pl
│           ├── clear.sh
│           ├── conf/
│           │   ├── SA-CORE-2014-005-D7.patch
│           │   ├── control-readme.txt
│           │   ├── https_proxy_le.conf
│           │   ├── lshell.conf
│           │   ├── pln_proxy.conf
│           │   ├── proxy.conf
│           │   ├── solr/
│           │   │   ├── apachesolr/
│           │   │   │   ├── solr4_drupal6/
│           │   │   │   │   ├── elevate.xml
│           │   │   │   │   ├── mapping-ISOLatin1Accent.txt
│           │   │   │   │   ├── protwords.txt
│           │   │   │   │   ├── schema.xml
│           │   │   │   │   ├── schema_extra_fields.xml
│           │   │   │   │   ├── schema_extra_types.xml
│           │   │   │   │   ├── solrconfig.xml
│           │   │   │   │   ├── solrconfig_extra.xml
│           │   │   │   │   ├── solrcore.properties
│           │   │   │   │   ├── stopwords.txt
│           │   │   │   │   └── synonyms.txt
│           │   │   │   ├── solr4_drupal7/
│           │   │   │   │   ├── elevate.xml
│           │   │   │   │   ├── mapping-ISOLatin1Accent.txt
│           │   │   │   │   ├── protwords.txt
│           │   │   │   │   ├── schema.xml
│           │   │   │   │   ├── schema_extra_fields.xml
│           │   │   │   │   ├── schema_extra_types.xml
│           │   │   │   │   ├── solrconfig.xml
│           │   │   │   │   ├── solrconfig_extra.xml
│           │   │   │   │   ├── solrcore.properties
│           │   │   │   │   ├── stopwords.txt
│           │   │   │   │   └── synonyms.txt
│           │   │   │   └── solr7_drupal7/
│           │   │   │       ├── elevate.xml
│           │   │   │       ├── mapping-ISOLatin1Accent.txt
│           │   │   │       ├── protwords.txt
│           │   │   │       ├── schema.xml
│           │   │   │       ├── schema_extra_fields.xml
│           │   │   │       ├── schema_extra_types.xml
│           │   │   │       ├── solrconfig.xml
│           │   │   │       ├── solrconfig_extra.xml
│           │   │   │       ├── solrcore.properties
│           │   │   │       ├── stopwords.txt
│           │   │   │       └── synonyms.txt
│           │   │   └── search_api_solr/
│           │   │       ├── solr4_drupal7/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── mapping-ISOLatin1Accent.txt
│           │   │       │   ├── protwords.txt
│           │   │       │   ├── schema.xml
│           │   │       │   ├── schema_extra_fields.xml
│           │   │       │   ├── schema_extra_types.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   ├── solrconfig_extra.xml
│           │   │       │   ├── solrcore.properties
│           │   │       │   ├── stopwords.txt
│           │   │       │   └── synonyms.txt
│           │   │       ├── solr7_drupal10/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── schema.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   └── solrcore.properties
│           │   │       ├── solr7_drupal7/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── mapping-ISOLatin1Accent.txt
│           │   │       │   ├── protwords.txt
│           │   │       │   ├── schema.xml
│           │   │       │   ├── schema_extra_fields.xml
│           │   │       │   ├── schema_extra_types.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   ├── solrconfig_extra.xml
│           │   │       │   ├── solrcore.properties
│           │   │       │   ├── stopwords.txt
│           │   │       │   └── synonyms.txt
│           │   │       ├── solr7_drupal8/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── schema.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   └── solrcore.properties
│           │   │       ├── solr7_drupal9/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── schema.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   └── solrcore.properties
│           │   │       └── solr9_drupal10/
│           │   │           ├── elevate.xml
│           │   │           ├── schema.xml
│           │   │           ├── solrconfig.xml
│           │   │           └── solrcore.properties
│           │   └── ssl_proxy.conf
│           ├── cron/
│           │   └── crontabs/
│           │       └── root
│           ├── daily.sh
│           ├── graceful.sh
│           ├── guest-fire.sh
│           ├── guest-water.sh
│           ├── ip_access.sh
│           ├── log/
│           │   └── EMPTY.txt
│           ├── manage_ltd_users.sh
│           ├── manage_solr_config.sh
│           ├── minute.sh
│           ├── monitor/
│           │   └── check/
│           │       ├── escapecheck.pl
│           │       ├── escapecheck.sh
│           │       ├── hackcheck.pl
│           │       ├── hackcheck.sh
│           │       ├── hackftp.pl
│           │       ├── hackftp.sh
│           │       ├── java.sh
│           │       ├── mysql.sh
│           │       ├── nginx.sh
│           │       ├── nginx_guard.sh
│           │       ├── php.sh
│           │       ├── redis.sh
│           │       ├── scan_nginx.sh
│           │       ├── segfault_alert.pl
│           │       ├── sqlcheck.pl
│           │       ├── system.sh
│           │       ├── unbound.sh
│           │       └── valkey.sh
│           ├── move_sql.sh
│           ├── mysql_backup.sh
│           ├── mysql_cleanup.sh
│           ├── mysql_cluster_backup.sh
│           ├── mysql_repair.sh
│           ├── proc_num_ctrl.pl
│           ├── purge_binlogs.sh
│           ├── runner.sh
│           ├── second.sh
│           └── usage.sh
├── docs/
│   ├── BACKUPS.md
│   ├── BACKUP_REGIONS.md
│   ├── BACKUP_RETENTION.md
│   ├── BACKUP_ROOT.md
│   ├── BACKUP_USER.md
│   ├── BLOWFISH.md
│   ├── BRANCHES.md
│   ├── BUILDTESTS.md
│   ├── CAVEATS.md
│   ├── CLUSTER.md
│   ├── COMPOSER.md
│   ├── CONTRIBUTING.md
│   ├── DEVELOPMENT.md
│   ├── DISK_RESIZE.md
│   ├── DRUPALGEDDON.md
│   ├── DRUSH-CLI.md
│   ├── FAQ.md
│   ├── FASTTRACK.md
│   ├── FIXME.md
│   ├── GEM.md
│   ├── INSTALL.md
│   ├── IPv6.md
│   ├── MAJORUPGRADE.md
│   ├── MIGRATE.md
│   ├── MODULES.md
│   ├── MYQUICK.md
│   ├── NEWRELIC.md
│   ├── NOTES.md
│   ├── PHP-FPM.md
│   ├── PLATFORMS.md
│   ├── PROVIDES.md
│   ├── REMOTE.md
│   ├── REWRITES.md
│   ├── SECURITY.md
│   ├── SELFUPGRADE.md
│   ├── SKYNET.md
│   ├── SMTP_SSL_DEBUG.md
│   ├── SOLR.md
│   ├── SOLR_OPTIMIZE.md
│   ├── SSL.md
│   ├── UPGRADE.md
│   ├── cnf/
│   │   ├── barracuda.cnf
│   │   └── octopus.cnf
│   ├── ctrl/
│   │   ├── platform.ctrl
│   │   ├── site.ctrl
│   │   └── system.ctrl
│   └── ini/
│       ├── platform/
│       │   └── INI.md
│       └── site/
│           └── INI.md
├── lib/
│   ├── functions/
│   │   ├── dns.sh.inc
│   │   ├── firewall.sh.inc
│   │   ├── helper.sh.inc
│   │   ├── hotfix.sh.inc
│   │   ├── master.sh.inc
│   │   ├── nginx.sh.inc
│   │   ├── php.sh.inc
│   │   ├── redis.sh.inc
│   │   ├── satellite.sh.inc
│   │   ├── solr.sh.inc
│   │   ├── sql.sh.inc
│   │   ├── system.sh.inc
│   │   ├── valkey.sh.inc
│   │   └── xtra.sh.inc
│   └── settings/
│       ├── barracuda.sh.cnf
│       └── octopus.sh.cnf
└── releases/
    ├── BOA-5.6.0-PRO.md
    ├── BOA-5.7.11-PRO.md
    ├── BOA-5.8.5-PRO.md
    └── BOA-5.9.1-PRO.md

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Ignore paths from OS X
.DS_Store


================================================
FILE: ANNOUNCEMENT.md
================================================
# The Future of Ægir 3 is Bryght!
*Announcement from Omega8.cc*

Omega8.cc is now the lead developer team for Ægir 3 running on BOA (Barracuda-Octopus-Ægir stack). We want to thank all past contributors who brought Ægir to life – your work makes today’s progress possible. Because of you, there is still a Bryght Future for Ægir.

<img width="1201" height="975" alt="Ægir-Sector" src="https://github.com/user-attachments/assets/8d444437-6931-481c-b0f7-66c09a953413" />

## What to Expect

- **Active maintenance and development**: Ægir 3 on BOA is alive and under active development. [See Adam’s comments here](https://www.drupal.org/project/hostmaster/issues/3517915).
- **Migration made easier**: We are working to make it simple to migrate entire legacy Ægir instances (Apache or Nginx) into self-hosted BOA as Octopus Ægir.
- **Standalone Ægir with BOA features**: We are doing our best to enable many BOA-derived features within Ægir standalone, so users can pick their flavour without adopting the full BOA stack.
- **Modern compatibility**: The BOA-based fork already supports **Drupal 11** and **PHP 8.4**, using vanilla **Drush 13** for site installs and updates while still relying on forked and improved **Drush 8** for daily operations.

## Development & Community

Development of BOA stack components continues here on GitHub:
👉 https://github.com/omega8cc/boa

At the same time, we continue to leverage the Drupal.org issue queues so **the community effort continues there** too, and all BOA improvements can be systematically **backported**.

Ægir is still very much alive, and together we can keep its **Bryght** Future shining!


================================================
FILE: BARRACUDA.sh.txt
================================================
#!/bin/bash


###----------------------------------------###
###
###  Barracuda Ægir Installer
###
###  Copyright (C) 2009-2026 Omega8.cc
###  noc@omega8.cc www.omega8.cc
###
###  This program is free software. You can
###  redistribute it and/or modify it under
###  the terms of the GNU GPL as published by
###  the Free Software Foundation, version 2
###  or later.
###
###  This program is distributed in the hope
###  that it will be useful, but WITHOUT ANY
###  WARRANTY; without even the implied
###  warranty of MERCHANTABILITY or FITNESS
###  FOR A PARTICULAR PURPOSE. See the GNU GPL
###  for more details.
###
###  You should have received a copy of the
###  GNU GPL along with this program.
###  If not, see http://www.gnu.org/licenses/
###
###  Code: https://github.com/omega8cc/boa
###
###----------------------------------------###

export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/libexec
export SHELL=/bin/bash

###
### Software versions
###
_ADMINER_VRN=4.8.1
_BZR_VRN=2.6.0
_CGP_VRN=master-22-07-2020
_CHIVE_VRN=1.3
_COMPOSER_VRN=2.8.2
_CSF_VRN=15.00
_CURL_VRN=8.20.0
_DB_SRC=repo.percona.com
###
###
_DRUSH_ELEVEN_VRN=11.6.0.9
_DRUSH_TEN_VRN=10.6.2.9
_DRUSH_EIGHT_VRN=8.5.0.5
_DRUSH_EIGHT_TEST_VRN=8.5.0-force
###
###
_GEOS_VRN=3.7.1
_GIT_VRN=2.51.0
_GOACCESS_VRN=1.9.4
_ICU_LEGACY_VRN=52_2
_ICU_MODERN_VRN=73-1
_IMAGE_MAGICK_VRN=7.1.1-7
_IMAGICK_OLD_VRN=3.1.2
_IMAGICK_VRN=3.8.1
_IONCUBE_VRN=15.0.0
_JETTY_7_VRN=7.6.17.v20150415
_JETTY_8_VRN=8.1.17.v20150415
_JETTY_9_VRN=9.2.16.v20160414
_JSMIN_PHP_LEGACY_VRN=2.0.1
_JSMIN_PHP_MODERN_VRN=3.1.0
_LIB_TIDY_VRN=5.2.0
_LIB_YAML_VRN=0.2.5
_LOGJ4_VRN=1.2.17
_LSHELL_VRN=0.10
_MAILPARSE_VRN=2.1.6
_NEW_RELIC_VRN=12.6.0.34
_NODE_VRN=v22.21.0
_MONGO_VRN=1.6.14
_MONGODB_VRN=1.2.5
_MSS_VRN=master-29-06-2024
_MYQUICK_VRN_ONE=0.19.3-3
_MYQUICK_VRN_TWO=0.21.3-2
_MYSQLTUNER_VRN=1.9.4
_NGINX_VRN=1.29.8
_OPENSSH_VRN=10.3p1
_OPENSSL_LEGACY_VRN=1.0.2u
_OPENSSL_EOL_VRN=1.1.1w
_OPENSSL_MODERN_VRN=3.5.6
_PERCONA_5_7_VRN=5.7
_PERCONA_8_0_VRN=8.0
_PERCONA_8_4_VRN=8.4
_PHP56_API=20131226
_PHP56_VRN=5.6.40
_PHP70_API=20151012
_PHP70_VRN=7.0.33
_PHP71_API=20160303
_PHP71_VRN=7.1.33
_PHP72_API=20170718
_PHP72_VRN=7.2.34
_PHP73_API=20180731
_PHP73_VRN=7.3.33
_PHP74_API=20190902
_PHP74_VRN=7.4.33
_PHP80_API=20200930
_PHP80_VRN=8.0.30
_PHP81_API=20210902
_PHP81_VRN=8.1.34
_PHP82_API=20220829
_PHP82_VRN=8.2.31
_PHP83_API=20230831
_PHP83_VRN=8.3.31
_PHP84_API=20240924
_PHP84_VRN=8.4.21
_PHP85_API=20250925
_PHP85_VRN=8.5.6
_PHP_APCU=5.1.27
_PHP_IGBINARY_EIGHT_FIVE=3.2.17
_PHP_IGBINARY_THREE=3.2.16
_PHP_IGBINARY_TWO=2.0.8
_PHP_MCRYPT=1.0.9
_PHPREDIS_SIX_LATEST_VRN=6.3.0
_PHPREDIS_SIX_MODERN_VRN=6.3.0
_PHPREDIS_SIX_LEGACY_VRN=6.0.2
_PHPREDIS_FIVE_VRN=5.3.7
_PHPREDIS_FOUR_VRN=4.3.0
_PHPREDIS_THREE_VRN=3.1.6
_PURE_FTPD_VRN=1.0.52
_PXC_VRN=1.4.16
_VALKEY_NINE_VRN=9.0.3
_VALKEY_EIGHT_VRN=8.1.4
_VALKEY_SEVEN_VRN=7.2.11
_REDIS_FOUR_VRN=4.0.14
_REDIS_FIVE_VRN=5.0.9
_REDIS_SIX_VRN=6.2.7
_REDIS_SEVEN_VRN=7.0.15
_RUBY_VRN=3.3.4
_SLF4J_VRN=1.7.21
_SOLR_1_VRN=1.4.1
_SOLR_3_VRN=3.6.2
_SOLR_4_VRN=4.9.1
_SOLR_7_VRN=7.7.3
_SOLR_9_VRN=9.8.1
_TWIGC_VRN=1.24.0
_UNBOUND_VRN=1.24.2
_UPROGRESS_LEGACY_VRN=1.0.3.1
_UPROGRESS_SEVEN_VRN=2.0.1.6
_UPROGRESS_EIGHT_VRN=2.0.2
_VNSTAT_VRN=2.13
_WKHTMLTOX_VRN=12.6-1
_YAML_PHP_LEGACY_VRN=1.3.2
_YAML_PHP_SEVENO_VRN=2.1.0
_YAML_PHP_MODERN_VRN=2.2.5
_ZLIB_VRN=1.3.1


###
### Default variables
###
_CUSTOM_NAME="nginx"
_DRUSH_VERSION="${_DRUSH_EIGHT_VRN}"
_DRUSH_VERSION_TEST="${_DRUSH_EIGHT_TEST_VRN}"
_FORCE_REDIS_RESTART=NO
_LOC_OS_CODE=""
_PURGE_ALL_THISHTIP=NO
export _SMALLCORE7_V=7.105.1
export _DRUPAL7="drupal-${_SMALLCORE7_V}"
_SPINNER=NO
_THIS_DB_PORT=3306
if [ -n "${STY+x}" ]; then
  _SPINNER=NO
fi


###
### Helper variables
###
_aptLiSys="/etc/apt/sources.list"
_barCnf="/root/.barracuda.cnf"
_bldPth="/opt/tmp/boa"
_crlGet="-L --max-redirs 3 -k -s --retry 9 --retry-delay 9 -A iCab"
_wgetGet="--max-redirect=3 --no-check-certificate -q --tries=9 --wait=9 --user-agent='iCab'"
_aptAllow="--allow-unauthenticated"
_aptYesUnth="-y ${_aptAllow}"
_filIncB="barracuda.sh.cnf"
_gitHub="https://github.com/omega8cc"
_gitLab="https://gitlab.com/omega8cc"
_libFnc="${_bldPth}/lib/functions"
_locCnf="${_bldPth}/aegir/conf"
_mtrInc="/var/aegir/config/includes"
_mtrNgx="/var/aegir/config/server_master/nginx"
_mtrTpl="/var/aegir/.drush/sys/provision/http/Provision/Config/Nginx"
_pthLog="/var/log/boa"
_vBs="/var/backups"


###
### SA variables
###
_saCoreN="SA-CORE-2014-005"
_saCoreS="${_saCoreN}-D7"
_saIncDb="includes/database/database.inc"
_saPatch="/var/xdrago/conf/${_saCoreS}.patch"


###
### Avoid too many questions
###
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
if [ -z "${TERM+x}" ]; then
  export TERM=vt100
fi


###
### Clean pid files on exit
###
_clean_pid_exit() {
  if [ -n "${1}" ]; then
    echo "REASON ${1} on $(date)" >> /root/.barracuda.sh.exit.exceptions.log
    [ -e "/opt/tmp/boa" ] && rm -rf /opt/tmp/*
  fi
  [ -e "/run/boa_wait.pid" ] && rm -f /run/boa_wait.pid
  [ -e "/run/boa_run.pid" ] && rm -f /run/boa_run.pid
  service cron start &> /dev/null
  _CNT=$(pgrep -fc 'tee -a /var/backups/barracuda-')
  if (( _CNT > 1 )); then
    pkill -f 'tee -a /var/backups/barracuda-'
  fi
  exit 1
}


###
### Panic on missing include
###
_panic_exit() {
  echo
  echo " EXIT: Required lib file not available?"
  echo " EXIT: $1"
  echo " EXIT: Cannot continue"
  echo " EXIT: Bye (0)"
  echo
  _clean_pid_exit _panic_exit_a
}


###
### Include default settings and basic functions
###
[ -r "${_vBs}/${_filIncB}" ] || _panic_exit "${_vBs}/${_filIncB}"
  source "${_vBs}/${_filIncB}"


###
### Download helpers and libs
###
if [ "${_OS_CODE}" = "excalibur" ]; then
  _DB_SERVER=Percona
else
  _DB_SERVER=Percona
fi
if [ "$(boa info | grep -c ${_DB_SERVER})" -lt 3 ] || [ ! -e "/usr/sbin/csf" ]; then
  if [ ! -e "/opt/tmp/boa/aegir/helpers/apt.conf.noi.nrml" ] \
    || [ ! -e "/opt/tmp/boa/aegir/helpers/apt.conf.noi.dist" ]; then
    _download_helpers_libs
  fi
else
  _download_helpers_libs
fi


###
### Include shared functions
###
_FL="helper dns system sql valkey redis nginx php solr master xtra firewall hotfix"
for f in ${_FL}; do
  [ -r "${_libFnc}/${f}.sh.inc" ] || _panic_exit "${f}"
  source "${_libFnc}/${f}.sh.inc"
done


###
### Make sure we are running as root
###
_if_running_as_root_barracuda


###
### Welcome msg
###
echo " "
_msg "Skynet Agent v.${_X_VERSION} on $(dmidecode -s system-manufacturer 2>&1) welcomes you aboard!"
echo " "
sleep 3


###
### Early procedures
###
_normalize_ip_name_variables
_mode_detection
_check_exception_mycnf
_virt_detection
_os_detection
_os_detection_minimal
_if_rebuild_src_on_major_os_upgrade
_if_long_generate_on_major_os_upgrade


###
### Quick php-idle ON/OFF procedure only
###
_if_php_idle_on_off


###
### Packages install/update on init
###
_sources_list_update
_basic_packages_install_on_init
_more_packages_install_on_init
_run_aptitude_full_upgrade


###
### Misc checks
###
_check_boa_php_compatibility
_check_boa_version
if [ "${_CHECKS_REMOTE_REPOS}" = "YES" ]; then
  _check_github_for_aegir_head_mode
  _check_db_src
  _check_git_repos
fi
_check_ip_hostname
_check_prepare_dirs_permissions


###
### Turn Off AppArmor temporarily while running barracuda
###
if [ "${_OS_CODE}" = "stretch" ] || [ "${_OS_CODE}" = "jessie" ]; then
  [ ! -e "/root/.turn_off_apparmor_in_octopus.cnf" ] && touch /root/.turn_off_apparmor_in_octopus.cnf
else
  _turn_off_apparmor_temporarily
fi


###
### Optional major system upgrades
###
_early_sys_ctrl_mark
_if_post_major_os_upgrade
_if_major_os_upgrade
_normal_sys_ctrl_mark


###
### Upgrade only Ægir Master Instance (obsolete mode)
###
if [ "${_ALLOW_HEAVY_REBUILDS}" = "YES" ]; then
  _if_upgrade_only_aegir_master
fi

###
### System packages install and update
###
_sys_packages_update
_if_proxysql_update
_sys_packages_install
_java_check_fix
_locales_check_fix


###
### Do not allow strong passwords until locales work properly
###
if [ "${_LOCALE_TEST}" = "BROKEN" ]; then
  _STRONG_PASSWORDS=NO
fi


###
### Install key packages first
###
_run_aptitude_full_upgrade
_run_aptitude_deps_install
_kill_nash


###
### OpenSSL modern and legacy support
###
_LC_SSL_CTRL="/root/.install.legacy.openssl.cnf"
_MD_SSL_CTRL="/root/.install.modern.openssl.cnf"
if [ "${_STATUS}" = "INIT" ] || [ ! -x "/usr/local/ssl/bin/openssl" ]; then
  if [ -e "${_MD_SSL_CTRL}" ]; then
    chattr -i ${_MD_SSL_CTRL}
    rm -f ${_MD_SSL_CTRL}
  fi
  touch ${_LC_SSL_CTRL}
  _if_ssl_install_src
  _sync_system_ssl_certs
  _ssl_paths_sync
  _ssl_crypto_lib_fix
  _curl_install_src
fi
if [ -x "/usr/local/ssl/bin/openssl" ]; then
  [ -e "${_LC_SSL_CTRL}" ] && rm -f ${_LC_SSL_CTRL}
fi
if [ "${_STATUS}" = "INIT" ] || [ ! -x "/usr/local/ssl3/bin/openssl" ]; then
  if [ ! -e "${_LC_SSL_CTRL}" ]; then
    if [ ! -e "${_MD_SSL_CTRL}" ]; then
      touch ${_MD_SSL_CTRL}
      chattr +i ${_MD_SSL_CTRL}
    fi
  fi
elif [ "${_STATUS}" = "UPGRADE" ]; then
  if [ ! -e "/opt/php73/bin/php" ] \
    && [ ! -e "/opt/php72/bin/php" ] \
    && [ ! -e "/opt/php71/bin/php" ] \
    && [ ! -e "/opt/php70/bin/php" ] \
    && [ ! -e "/opt/php56/bin/php" ]; then
    if [ ! -e "${_MD_SSL_CTRL}" ] \
      && [ ! -e "${_LC_SSL_CTRL}" ]; then
      touch ${_MD_SSL_CTRL}
      chattr +i ${_MD_SSL_CTRL}
    fi
  fi
  if [ ! -x "/usr/local/ssl/bin/openssl" ] \
    && [ -e "${_LC_SSL_CTRL}" ]; then
    if [ -e "${_MD_SSL_CTRL}" ]; then
      chattr -i ${_MD_SSL_CTRL}
      rm -f ${_MD_SSL_CTRL}
    fi
  fi
fi
if [ -x "/usr/local/ssl/bin/openssl" ] \
  && [ -x "/usr/local/ssl3/bin/openssl" ]; then
  if [ ! -e "${_MD_SSL_CTRL}" ]; then
    touch ${_MD_SSL_CTRL}
    chattr +i ${_MD_SSL_CTRL}
  fi
fi


###
### Install OpenSSL and cURL from sources
###
if [ "${_ALLOW_HEAVY_REBUILDS}" = "YES" ] || [ ! -x "/usr/local/ssl3/bin/openssl" ]; then
  _if_ssl_install_src
  _sync_system_ssl_certs
  _ssl_paths_sync
  _ssl_crypto_lib_fix
  _curl_install_src
fi


###
### Install OpenSSH from sources
###
if [ "${_SSH_FROM_SOURCES}" = "YES" ] && [ "${_ALLOW_HEAVY_REBUILDS}" = "YES" ]; then
  if [ "${_STATUS}" = "INIT" ] || [ "${_STATUS}" = "UPGRADE" ]; then
    if [ "${_OS_DIST}" = "Debian" ] || [ "${_OS_DIST}" = "Devuan" ]; then
      _sshd_install_src
      _sshd_armour
    fi
  fi
fi


###
### Install Percona server
###
_db_server_install


###
### Finalize initial Percona server and tools setup
###
_init_sql_root_credentials
_sql_root_credentials_update
_myquick_install_upgrade


###
### Install other services
###
if [ "${_ALLOW_HEAVY_REBUILDS}" = "YES" ]; then
  _nginx_install_upgrade
  _nginx_initd_check
  _nginx_mime_check_fix
  if [ "${_VALKEY_MAJOR_RELEASE}" = "7" ] \
    || [ "${_VALKEY_MAJOR_RELEASE}" = "8" ] \
    || [ "${_VALKEY_MAJOR_RELEASE}" = "9" ]; then
    _valkey_install_upgrade
  else
    _redis_install_upgrade
  fi
  _lshell_install_upgrade
  _magick_install_upgrade
  _php_install_deps
  _php_libs_fix
  _php_if_versions_cleanup_cnf
  if [ "${_STATUS}" = "UPGRADE" ]; then
    _php_ioncube_check_if_update
    _php_check_if_rebuild
    _mytop_install
  fi
  _php_install_upgrade
  _php_config_check_update
  _php_upgrade_all
  _if_install_php_newrelic
  _newrelic_check_fix
fi
_smtp_check
_xdrago_install_upgrade
_if_drupal_patches_update
_mc_panels_ini_update


###
### Download system-wide Drush versions
###
_drush_system_install_update


###
### Install or upgrade Ægir Master Instance
###
if [ "${_ALLOW_HEAVY_REBUILDS}" = "YES" ]; then
  _aegir_master_install_upgrade
  _aegir_bin_extra_check_fix
  _nginx_wildcard_ssl_install
  _nginx_config_update_fix
  _aegir_master_display_login_link
fi


###
### Install or upgrade DNS cache server
###
if [ "${_STATUS}" = "UPGRADE" ]; then
  _dns_unbound_install_upgrade
fi


###
### Install or upgrade csf/lfd monitoring
###
if [ "${_STATUS}" = "UPGRADE" ]; then
  _csf_lfd_install_upgrade
fi


###
### Optional add-on services
###
if [ "${_STATUS}" = "INIT" ] || [ "${_STATUS}" = "UPGRADE" ]; then
  if [ "${_ALLOW_HEAVY_REBUILDS}" = "YES" ]; then
    _if_install_ftpd
    _if_install_vnstat
    _if_install_wkhtmltox
    _if_install_chromium
    _if_install_git_src
    _if_install_ffmpeg
    _if_install_bzr
    [ ! -e "/root/.deny.java.cnf" ] && _if_install_upgrade_solr
    _if_install_adminer
    _if_install_chive
    _if_install_sqlbuddy
    _if_install_collectd
    _if_install_webmin
    _if_install_bind
    _if_install_ruby
    _if_install_node
    _sftp_ftps_modern_fix
  fi
fi


###
### Update rsyslog configuration
###
_rsyslog_config_update


###
### Install or uninstall AppArmor after barracuda install and upgrade
###
if [ -e "/root/.keep_apparmor_on.cnf" ] && [ ! -e "/root/.deny.apparmor.cnf" ]; then
  [ ! -e "/root/.allow.apparmor.cnf" ] && touch /root/.allow.apparmor.cnf
  if [ ! -e "/root/.run-to-excalibur.cnf" ] \
    && [ ! -e "/root/.run-to-daedalus.cnf" ] \
    && [ ! -e "/root/.run-to-chimaera.cnf" ] \
    && [ ! -e "/root/.run-to-beowulf.cnf" ]; then
    if [ "${_OS_CODE}" != "stretch" ] && [ "${_OS_CODE}" != "jessie" ]; then
      _if_install_apparmor
    fi
  fi
else
  [ -e "/root/.allow.apparmor.cnf" ] && rm -f /root/.allow.apparmor.cnf
  [ ! -e "/root/.deny.apparmor.cnf" ] && touch /root/.deny.apparmor.cnf
  if [ "${_OS_CODE}" != "stretch" ] && [ "${_OS_CODE}" != "jessie" ]; then
    _if_remove_apparmor
  fi
fi


###
### Update barracuda log, tools and system settings
###
_pam_umask_check_fix
_pam_many_check_fix
_avatars_check_fix
_sysctl_update
_initd_update
_apticron_update
_barracuda_log_update
_find_server_city


###
### Complete system checks and cleanup
###
_complete
exit 0


###----------------------------------------###
###
###  Barracuda Ægir Installer
###  Copyright (C) 2009-2026 Omega8.cc
###  noc@omega8.cc www.omega8.cc
###
###----------------------------------------###


================================================
FILE: BOA.sh.txt
================================================
#!/bin/bash


###----------------------------------------###
###
###  BOA Meta Installer
###
###  Copyright (C) 2009-2026 Omega8.cc
###  noc@omega8.cc www.omega8.cc
###
###  This program is free software. You can
###  redistribute it and/or modify it under
###  the terms of the GNU GPL as published by
###  the Free Software Foundation, version 2
###  or later.
###
###  This program is distributed in the hope
###  that it will be useful, but WITHOUT ANY
###  WARRANTY; without even the implied
###  warranty of MERCHANTABILITY or FITNESS
###  FOR A PARTICULAR PURPOSE. See the GNU GPL
###  for more details.
###
###  You should have received a copy of the
###  GNU GPL along with this program.
###  If not, see http://www.gnu.org/licenses/
###
###  Code: https://github.com/omega8cc/boa
###
###----------------------------------------###


###----------------------------------------###
### How To: run it with bash, not with sh  ###
###----------------------------------------###
###
###  $ wget -qO- http://files.aegir.cc/BOA.sh.txt | bash
###

###----------------------------------------###
### DON'T EDIT ANYTHING BELOW THIS LINE    ###
###----------------------------------------###

export HOME=/root
export SHELL=/bin/bash
export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/libexec
export _tRee=dev
export _xSrl=591devT01
export _rLsn="BOA-5.9.1"
export _bTs=591v02

###
### Avoid too many questions
###
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
if [ -z "${TERM+x}" ]; then
  export TERM=vt100
fi

_NOW=$(date +%y%m%d-%H%M%S)
export _NOW=${_NOW//[^0-9-]/}
_TODAY=$(date +%y%m%d)
export _TODAY=${_TODAY//[^0-9]/}
#
_barCnf="/root/.barracuda.cnf"
_crlGet="-L --max-redirs 3 -k -s --retry 9 --retry-delay 9 -A iCab"
_wgetGet="--max-redirect=3 --no-check-certificate -q --tries=9 --wait=9 --user-agent='iCab'"
_aptAllow="--allow-unauthenticated"
_aptYesUnth="-y ${_aptAllow}"
_optBin="/opt/local/bin"
_usrBin="/usr/local/bin"
_xpthLog="/var/xdrago/log"
_pthLog="/var/log/boa"
_tBn="tools/bin"
_vBs="/var/backups"
_boaToolsPid="${_pthLog}/updateBOAtools.${_bTs}.ctrl.${_tRee}.${_xSrl}.pid"
_INITINS="/usr/bin/apt-get ${_aptAllow} -y install"
#
if [ ! -e "${_pthLog}/.migrated.txt" ] && [ -d "${_xpthLog}" ]; then
  mkdir -p "${_pthLog}"
  cp -a ${_xpthLog}/*.pid ${_pthLog}/
  cp -a ${_xpthLog}/.*pid ${_pthLog}/
  cp -a ${_xpthLog}/*.log ${_pthLog}/
  cp -a ${_xpthLog}/*.txt ${_pthLog}/
  cp -a ${_xpthLog}/usage ${_pthLog}/
  cp -a ${_xpthLog}/daily ${_pthLog}/
  cp -a ${_xpthLog}/core  ${_pthLog}/
  cp -a ${_xpthLog}/le    ${_pthLog}/
  touch "${_pthLog}/.migrated.txt"
fi
[ ! -d "${_pthLog}/usage" ] && mkdir -p "${_pthLog}/usage"
[ ! -d "${_pthLog}/daily" ] && mkdir -p "${_pthLog}/daily"
[ ! -d "${_pthLog}/core" ] && mkdir -p "${_pthLog}/core"
[ ! -d "${_pthLog}/le" ] && mkdir -p "${_pthLog}/le"
#
_eldirF="0001-Print-site_footer-if-defined.patch"
_eldirP="/var/xdrago/conf/${_eldirF}"
#
_tenCorePatchFname="drupal-ten-aegir-core-01.patch"
_tenCorePatchPath="/data/conf/patches/${_tenCorePatchFname}"
#
_tenConsolePatchFname="drupal-ten-aegir-console-02.patch"
_tenConsolePatchPath="/data/conf/patches/${_tenConsolePatchFname}"
#
_elevenCorePatchFname="drupal-eleven-aegir-core-01.patch"
_elevenCorePatchPath="/data/conf/patches/${_elevenCorePatchFname}"
#
_elevenConsolePatchFname="drupal-eleven-aegir-console-02.patch"
_elevenConsolePatchPath="/data/conf/patches/${_elevenConsolePatchFname}"
#
_elevenValidatorPatchFname="drupal-eleven-aegir-validator-03.patch"
_elevenValidatorPatchPath="/data/conf/patches/${_elevenValidatorPatchFname}"
#
_provLeInc="provision_hosting_le.drush.inc"
_provLeIncFull="/var/xdrago/conf/${_provLeInc}"
#
_hoLeInc="hosting_le_vhost.drush.inc"
_hoLeIncFull="/var/xdrago/conf/${_hoLeInc}"
#
_dehydName="dehydrated"
_dehydSrcPath="/var/xdrago/conf/${_dehydName}"
_legacyLeSh="/var/xdrago/conf/letsencrypt.sh"

_DEBUG_MODE=$([ -e "/root/.debug-barracuda-installer.cnf" ] && echo "YES" || echo "NO")

_os_detection_minimal() {
  _APT_UPDATE="apt-get update"
  _OS_CODE=$(lsb_release -ar 2>/dev/null | grep -i codename | cut -s -f2)
  _OS_LIST="excalibur daedalus chimaera beowulf buster bullseye bookworm trixie"
  for e in ${_OS_LIST}; do
    if [ "${e}" = "${_OS_CODE}" ]; then
      _APT_UPDATE="apt-get update --allow-releaseinfo-change"
    fi
  done
}

_apt_clean_update() {
  ${_APT_UPDATE} -qq 2>/dev/null
  _CALLER_SCRIPT="$(basename "${BASH_SOURCE[-1]}")"
  _CALLER_SCRIPT="${_CALLER_SCRIPT//[^a-zA-Z0-9._-]/_}"
  date +%s > "/run/_latest_apt_clean_update.${_CALLER_SCRIPT}.pid"
}

_if_hosted_sys() {
  _hName="$(cat /etc/hostname 2>/dev/null | tr -d '\n' || hostname -f 2>/dev/null)"
  if [ -e "/root/.host8.cnf" ] \
    || [[ "${_hName}" =~ ".aegir.cc"($) ]]; then
    _hostedSys=YES
  else
    _hostedSys=NO
  fi
}

#
# Find server city.
_find_server_city() {
  if [ -e "/root/.found_correct_city.cnf" ]; then
    _LOC_CITY=$(cat /root/.found_correct_city.cnf 2>/dev/null | tr -d '\n')
  else
    if [ -e "/root/.found_correct_ipv4.cnf" ]; then
      _LOC_IP=$(cat /root/.found_correct_ipv4.cnf 2>/dev/null | tr -d '\n')
      _LOC_CITY=$(curl ${_crlGet} ipinfo.io/${_LOC_IP}/city 2>&1)
      _LOC_CITY=$(echo -n ${_LOC_CITY} | tr -d "\n" 2>&1)
    fi
    if [ ! -z "${_LOC_CITY}" ]; then
      _LOC_CITY=$(echo "${_LOC_CITY}" | tr ' ' '+' 2>&1)
      echo ${_LOC_CITY} > /root/.found_correct_city.cnf
    fi
  fi
}

#
# Find correct IP.
_find_correct_ip() {
  if [ -e "/root/.found_correct_ipv4.cnf" ]; then
    _LOC_IP=$(cat /root/.found_correct_ipv4.cnf 2>/dev/null | tr -d '\n')
  else
    _LOC_IP=$(curl ${_crlGet} https://api.ipify.org | sed 's/[^0-9\.]//g')
    if [ -z "${_LOC_IP}" ]; then
      _LOC_IP=$(curl ${_crlGet} http://ipv4.icanhazip.com | sed 's/[^0-9\.]//g')
    fi
    if [ ! -z "${_LOC_IP}" ]; then
      echo ${_LOC_IP} > /root/.found_correct_ipv4.cnf
    fi
  fi
  if [ -n "${_LOC_IP}" ] && grep -qE "${_LOC_IP}\s" /etc/hosts; then
    cp -af /etc/hosts /etc/.was.hosts
    sed -i "s/^${_LOC_IP}.*//g" /etc/hosts
    [ -x "/etc/init.d/unbound" ] && [ ! -e "/usr/etc/unbound/unbound.conf.d" ] && mkdir -p /usr/etc/unbound/unbound.conf.d
    [ -x "/etc/init.d/unbound" ] && service unbound restart &> /dev/null
  fi
}

_fix_dns_settings() {
  [ ! -d "${_vBs}" ] && mkdir -p ${_vBs}
  rm -f ${_vBs}/resolv.conf.tmp
  if ! grep -q "nameserver 127.0.0.1" /etc/resolv.conf; then
    if [ -x "/usr/sbin/unbound" ] && [ -e "/run/unbound/unbound.pid" ]; then
      _FORCE_RESOLV_UPDATE=YES
    else
      _FORCE_RESOLV_UPDATE=NO
    fi
  fi
  if ! grep -q "BOA-DNS-Config" /etc/resolv.conf || [ "${_FORCE_RESOLV_UPDATE}" = "YES" ]; then
    echo "### BOA-DNS-Config ###" > ${_vBs}/resolv.conf.tmp
    if [ -x "/usr/sbin/unbound" ] && [ -e "/run/unbound/unbound.pid" ]; then
      echo "nameserver 127.0.0.1" >> ${_vBs}/resolv.conf.tmp
    fi
    echo "nameserver 1.1.1.1" >> ${_vBs}/resolv.conf.tmp
    echo "nameserver 8.8.8.8" >> ${_vBs}/resolv.conf.tmp
    echo "nameserver 9.9.9.9" >> ${_vBs}/resolv.conf.tmp
  fi
  if [ -e "${_vBs}/resolv.conf.tmp" ]; then
    chattr -i /etc/resolv.conf
    rm -f /etc/resolv.conf
    cp -a ${_vBs}/resolv.conf.tmp /etc/resolv.conf
    chmod 0644 /etc/resolv.conf
    chattr +i /etc/resolv.conf
    cp -a ${_vBs}/resolv.conf.tmp ${_vBs}/resolv.conf.vanilla
  fi
  if [ -x "/usr/sbin/unbound-control" ] \
    && [ -e "/etc/resolvconf/run/interface/lo.unbound" ]; then
    unbound-control reload &> /dev/null
  fi
}

_check_dns_settings() {
  _EHU=NO
  if ! grep -q "127.0.0.1 localhost" /etc/hosts; then
    sed -i "s/^127.0.0.1.*//g" /etc/hosts
    echo "" >> /etc/hosts
    echo "127.0.0.1 localhost" >> /etc/hosts
    _EHU=YES
  fi
  if grep -q "files.aegir.cc" /etc/hosts; then
    sed -i "s/.*files.aegir.cc.*//g" /etc/hosts
    _EHU=YES
  fi
  if grep -q "github" /etc/hosts; then
    sed -i "s/.*github.*//g" /etc/hosts
    _EHU=YES
  fi
  if [ "${_EHU}" = "YES" ]; then
    echo >>/etc/hosts
    sed -i "/^$/d" /etc/hosts
  fi
  if [ -L "/etc/resolv.conf" ]; then
    _fix_dns_settings
    return 1  # Exit the function but continue the script
  fi
  if [ -e "/root/.use.default.nameservers.cnf" ]; then
    if [ -e "/root/.use.local.nameservers.cnf" ]; then
      rm -f /root/.use.local.nameservers.cnf
    fi
    _USE_DEFAULT_DNS=YES
    if ! grep -q "BOA-DNS-Config" /etc/resolv.conf; then
      _fix_dns_settings
      return 1  # Exit the function but continue the script
    fi
  fi
  if [ -e "/root/.use.local.nameservers.cnf" ]; then
    _USE_PROVIDER_DNS=YES
  else
    _REMOTE_DNS_TEST=$(host files.aegir.cc 1.1.1.1 -w 10 2>&1)
    if ! grep -q "BOA-DNS-Config" /etc/resolv.conf; then
      _fix_dns_settings
      return 1  # Exit the function but continue the script
    fi
  fi
  if [[ "${_REMOTE_DNS_TEST}" =~ "no servers could be reached" ]] \
    || [[ "${_REMOTE_DNS_TEST}" =~ "Host files.aegir.cc not found" ]] \
    || [ "${_USE_PROVIDER_DNS}" = "YES" ]; then
    _fix_dns_settings
  fi
}

_find_fast_mirror_early() {
  _isNetc="$(which netcat)"
  if [ ! -x "${_isNetc}" ] || [ -z "${_isNetc}" ]; then
    if [ ! -e "/etc/apt/apt.conf.d/00sandboxoff" ] \
      && [ -e "/etc/apt/apt.conf.d" ]; then
      echo "APT::Sandbox::User \"root\";" > /etc/apt/apt.conf.d/00sandboxoff
    fi
    _apt_clean_update
    apt-get install netcat-traditional ${_aptYesUnth} &> /dev/null
  fi
  _ffMirr=/opt/local/bin/ffmirror
  if [ -x "${_ffMirr}" ]; then
    _ffList="/var/backups/boa-mirrors-2025-01.txt"
    [ -d "/var/backups" ] || mkdir -p /var/backups
    if [ ! -e "${_ffList}" ]; then
      echo "eu.files.aegir.cc"  > ${_ffList}
      echo "us.files.aegir.cc" >> ${_ffList}
      echo "ao.files.aegir.cc" >> ${_ffList}
    fi
    if [ -e "${_ffList}" ]; then
      _BROKEN_FFMIRR_TEST=$(grep "stuff" ${_ffMirr} 2>&1)
      if [[ "${_BROKEN_FFMIRR_TEST}" =~ "stuff" ]]; then
        _CHECK_MIRROR=$(bash ${_ffMirr} < ${_ffList} 2>&1)
        _CHECK_MIRROR=$(bash ${_ffMirr} < ${_ffList} 2>&1)
        _USE_MIR="${_CHECK_MIRROR}"
        [[ "${_USE_MIR}" =~ "printf" ]] && _USE_MIR="files.aegir.cc"
      else
        _USE_MIR="files.aegir.cc"
      fi
    else
      _USE_MIR="files.aegir.cc"
    fi
  else
    _USE_MIR="files.aegir.cc"
  fi
  _urlDev="http://${_USE_MIR}/dev"
  _urlHmr="http://${_USE_MIR}/versions/${_tRee}/boa/aegir"
}

_extract_archive() {
  if [ ! -z "$1" ]; then
    case $1 in
      *.tar.bz2)   tar xjf $1    ;;
      *.tar.gz)    tar xzf $1    ;;
      *.tar.xz)    tar xvf $1    ;;
      *.bz2)       bunzip2 $1    ;;
      *.rar)       unrar x $1    ;;
      *.gz)        gunzip -q $1  ;;
      *.tar)       tar xf $1     ;;
      *.tbz2)      tar xjf $1    ;;
      *.tgz)       tar xzf $1    ;;
      *.zip)       unzip -qq $1  ;;
      *.Z)         uncompress $1 ;;
      *.7z)        7z x $1       ;;
      *)           echo "'$1' cannot be extracted via >extract<" ;;
    esac
    rm -f $1
  fi
}

#
# Download and extract from dev/contrib mirror.
_get_dev_contrib() {
  if [ ! -z "$1" ]; then
    _max_attempts=10
    _attempt_num=1
    _success=0
    while [ ${_attempt_num} -le ${_max_attempts} ]; do
      [ "${_DEBUG_MODE}" = "YES" ] && echo "DNLD: Attempt ${_attempt_num} of ${_max_attempts}: Downloading $1..."
      if curl ${_crlGet} "${_urlDev}/${_tRee}/contrib/$1" -o "$1"; then
        _success=1
        break
      else
        [ "${_DEBUG_MODE}" = "YES" ] && echo "DNLD: Attempt ${_attempt_num} failed."
        _attempt_num=$((_attempt_num+1))
        if [ "${_attempt_num}" -le "${_max_attempts}" ]; then
          [ "${_DEBUG_MODE}" = "YES" ] && echo "DNLD: Retrying in 9 seconds..."
          sleep 9
        fi
      fi
    done
    if [ "${_success}" -eq 1 ]; then
      _extract_archive "$1"
    else
      echo "OOPS: Failed to download ${_urlDev}/${_tRee}/contrib/$1 after ${_max_attempts} attempts"
      return 1  # Exit the function but continue the script
    fi
  fi
}

#
# Download and extract archive from dev/src mirror.
_get_dev_src() {
  if [ ! -z "$1" ]; then
    _max_attempts=10
    _attempt_num=1
    _success=0
    while [ ${_attempt_num} -le ${_max_attempts} ]; do
      [ "${_DEBUG_MODE}" = "YES" ] && echo "DNLD: Attempt ${_attempt_num} of ${_max_attempts}: Downloading $1..."
      if curl ${_crlGet} "${_urlDev}/src/$1" -o "$1"; then
        _success=1
        break
      else
        [ "${_DEBUG_MODE}" = "YES" ] && echo "DNLD: Attempt ${_attempt_num} failed."
        _attempt_num=$((_attempt_num+1))
        if [ "${_attempt_num}" -le "${_max_attempts}" ]; then
          [ "${_DEBUG_MODE}" = "YES" ] && echo "DNLD: Retrying in 9 seconds..."
          sleep 9
        fi
      fi
    done
    if [ "${_success}" -eq 1 ]; then
      _extract_archive "$1"
    else
      echo "OOPS: Failed to download ${_urlDev}/src/$1 after ${_max_attempts} attempts"
      return 1  # Exit the function but continue the script
    fi
  fi
}

_if_clean_boa_env() {
  if [ ! -x "/etc/init.d/clean-boa-env" ]; then
    curl ${_crlGet} "${_urlHmr}/conf/var/clean-boa-env" -o /etc/init.d/clean-boa-env
    if [ -e "/etc/init.d/clean-boa-env" ]; then
      chmod 700 /etc/init.d/clean-boa-env
      chown root:root /etc/init.d/clean-boa-env
      update-rc.d clean-boa-env defaults &> /dev/null
    fi
  fi
}

###
### Function to verify BOA keys
###
_verify_boa_keys() {
  if [ -e "/root/.dev.server.cnf" ]; then
    echo "PROC: _verify_boa_keys in BOA.sh.txt"
  fi
  if [ "${_tRee}" = "pro" ] || [ "${_tRee}" = "dev" ]; then
    _if_hosted_sys
    _allw=NO
    _urlEnc="http://${_USE_MIR}/enc/2024"
    _encName=$(echo ${_hName} \
      | openssl md5 \
      | awk '{ print $2}' \
      | tr -d "\n" 2>&1)
    if [[ "${_hName}" =~ ".aegir.cc"($) ]] \
      || [[ "${_hName}" =~ ".o8.io"($) ]] \
      || [[ "${_hName}" =~ ".boa.io"($) ]]; then
      _allw=YES
    fi
    mkdir -p /var/opt
    rm -f /var/opt/_encN*
    curl ${_crlGet} "${_urlEnc}/${_encName}" -o /var/opt/_encN.${_encName}.tmp
    wait
    echo "${_hName}.${_encName}" > /var/opt/_encN_local.${_encName}.tmp
    wait
    if [ -e "/var/opt/_encN.${_encName}.tmp" ] && [ -e "/var/opt/_encN_local.${_encName}.tmp" ]; then
      _diffTestIf=$(diff -w -B /var/opt/_encN.${_encName}.tmp /var/opt/_encN_local.${_encName}.tmp 2>&1)
      if [ ! -z "${_diffTestIf}" ] && [ "${_allw}" = "NO" ]; then
        echo
        echo "Your system requires valid license for access to ${_rLsn}-${_tRee}"
        echo "Please visit https://omega8.cc/licenses to purchase your own"
        echo
        if [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
          && [ ! -e "/var/aegir/key/barracuda_key.txt" ]; then
          mkdir -p /var/aegir/key
          cat /var/opt/_encN_local.${_encName}.tmp > /var/aegir/key/barracuda_key.txt
        fi
        rm -f /var/opt/_encN*
        exit 0
      else
        if [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
          && [ ! -e "/var/aegir/key/barracuda_key.txt" ]; then
          mkdir -p /var/aegir/key
          cat /var/opt/_encN_local.${_encName}.tmp > /var/aegir/key/barracuda_key.txt
        fi
      fi
    else
      echo
      echo "Your system requires valid license to use this BOA version (${_tRee})"
      echo "Unfortunately it was not possible to verify your system status"
      echo "Please contact our support but visit https://omega8.cc/licenses first"
      echo
      exit 0
    fi
  fi
}

_locales_check_fix_early() {
  _isLoc="$(which locale)"
  if [ ! -x "${_isLoc}" ] || [ -z "${_isLoc}" ]; then
    apt-get update -qq &> /dev/null
    ${_INITINS} locales locales-all &> /dev/null
  fi
  _LOC_TEST=$(locale 2>&1)
  if [[ "${_LOC_TEST}" =~ LANG=.*UTF-8 ]]; then
    _LOCALE_TEST=OK
  fi
  if [[ "${_LOC_TEST}" =~ "Cannot" ]]; then
    _LOCALE_TEST=BROKEN
  fi
  if [ "${_LOCALE_TEST}" = "BROKEN" ]; then
    _LOCALE_GEN_TEST=$(grep -v "^#" /etc/locale.gen 2>&1)
    if [[ ! "${_LOCALE_GEN_TEST}" =~ "en_US.UTF-8 UTF-8" ]]; then
      echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
    fi
    sed -i "/^$/d" /etc/locale.gen
    locale-gen &> /dev/null
    locale-gen en_US.UTF-8 &> /dev/null
    # Explicitly enforce all locale settings
    update-locale \
      LANG=en_US.UTF-8 \
      LC_CTYPE=en_US.UTF-8 \
      LC_COLLATE=POSIX \
      LC_NUMERIC=POSIX \
      LC_TIME=en_US.UTF-8 \
      LC_MONETARY=en_US.UTF-8 \
      LC_MESSAGES=en_US.UTF-8 \
      LC_PAPER=en_US.UTF-8 \
      LC_NAME=en_US.UTF-8 \
      LC_ADDRESS=en_US.UTF-8 \
      LC_TELEPHONE=en_US.UTF-8 \
      LC_MEASUREMENT=en_US.UTF-8 \
      LC_IDENTIFICATION=en_US.UTF-8 \
      LC_ALL= &> /dev/null
    # Define all locale settings on the fly to prevent unnecessary
    # warnings during installation of packages.
    export LANG=en_US.UTF-8 &> /dev/null
    export LC_CTYPE=en_US.UTF-8 &> /dev/null
    export LC_COLLATE=POSIX &> /dev/null
    export LC_NUMERIC=POSIX &> /dev/null
    export LC_TIME=en_US.UTF-8 &> /dev/null
    export LC_MONETARY=en_US.UTF-8 &> /dev/null
    export LC_MESSAGES=en_US.UTF-8 &> /dev/null
    export LC_PAPER=en_US.UTF-8 &> /dev/null
    export LC_NAME=en_US.UTF-8 &> /dev/null
    export LC_ADDRESS=en_US.UTF-8 &> /dev/null
    export LC_TELEPHONE=en_US.UTF-8 &> /dev/null
    export LC_MEASUREMENT=en_US.UTF-8 &> /dev/null
    export LC_IDENTIFICATION=en_US.UTF-8 &> /dev/null
    export LC_ALL= &> /dev/null
  else
    _LOCALE_GEN_TEST=$(grep -v "^#" /etc/locale.gen 2>&1)
    if [[ ! "${_LOCALE_GEN_TEST}" =~ "en_US.UTF-8 UTF-8" ]]; then
      echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
    fi
    sed -i "/^$/d" /etc/locale.gen
    locale-gen &> /dev/null
    locale-gen en_US.UTF-8 &> /dev/null
    # Explicitly enforce locale settings required for consistency
    update-locale \
      LANG=en_US.UTF-8 \
      LC_CTYPE=en_US.UTF-8 \
      LC_COLLATE=POSIX \
      LC_NUMERIC=POSIX \
      LC_ALL= &> /dev/null
    # Define locale settings required for consistency also on the fly
    export LC_COLLATE=POSIX &> /dev/null
    export LC_NUMERIC=POSIX &> /dev/null
    export LC_ALL= &> /dev/null
  fi
  _LOCALES_BASHRC_TEST=$(grep LC_COLLATE /root/.bashrc 2>&1)
  if [[ ! "${_LOCALES_BASHRC_TEST}" =~ "LC_COLLATE" ]]; then
    printf "\n" >> /root/.bashrc
    echo "export LANG=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_CTYPE=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_COLLATE=POSIX" >> /root/.bashrc
    echo "export LC_NUMERIC=POSIX" >> /root/.bashrc
    echo "export LC_TIME=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_MONETARY=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_MESSAGES=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_PAPER=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_NAME=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_ADDRESS=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_TELEPHONE=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_MEASUREMENT=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_IDENTIFICATION=en_US.UTF-8" >> /root/.bashrc
    echo "export LC_ALL=" >> /root/.bashrc
    printf "\n" >> /root/.bashrc
  fi
}

_if_fix_iptables_symlinks() {
  ###
  ### Fix for iptables paths backward compatibility
  ###
  if [ -x "/sbin/iptables" ] && [ ! -e "/usr/sbin/iptables" ]; then
    ln -sfn /sbin/iptables /usr/sbin/iptables
  fi
  if [ -x "/usr/sbin/iptables" ] && [ ! -e "/sbin/iptables" ]; then
    ln -sfn /usr/sbin/iptables /sbin/iptables
  fi
  if [ -x "/sbin/iptables-save" ] && [ ! -e "/usr/sbin/iptables-save" ]; then
    ln -sfn /sbin/iptables-save /usr/sbin/iptables-save
  fi
  if [ -x "/usr/sbin/iptables-save" ] && [ ! -e "/sbin/iptables-save" ]; then
    ln -sfn /usr/sbin/iptables-save /sbin/iptables-save
  fi
  if [ -x "/sbin/iptables-restore" ] && [ ! -e "/usr/sbin/iptables-restore" ]; then
    ln -sfn /sbin/iptables-restore /usr/sbin/iptables-restore
  fi
  if [ -x "/usr/sbin/iptables-restore" ] && [ ! -e "/sbin/iptables-restore" ]; then
    ln -sfn /usr/sbin/iptables-restore /sbin/iptables-restore
  fi
  if [ -x "/sbin/ip6tables" ] && [ ! -e "/usr/sbin/ip6tables" ]; then
    ln -sfn /sbin/ip6tables /usr/sbin/ip6tables
  fi
  if [ -x "/usr/sbin/ip6tables" ] && [ ! -e "/sbin/ip6tables" ]; then
    ln -sfn /usr/sbin/ip6tables /sbin/ip6tables
  fi
  if [ -x "/sbin/ip6tables-save" ] && [ ! -e "/usr/sbin/ip6tables-save" ]; then
    ln -sfn /sbin/ip6tables-save /usr/sbin/ip6tables-save
  fi
  if [ -x "/usr/sbin/ip6tables-save" ] && [ ! -e "/sbin/ip6tables-save" ]; then
    ln -sfn /usr/sbin/ip6tables-save /sbin/ip6tables-save
  fi
  if [ -x "/sbin/ip6tables-restore" ] && [ ! -e "/usr/sbin/ip6tables-restore" ]; then
    ln -sfn /sbin/ip6tables-restore /usr/sbin/ip6tables-restore
  fi
  if [ -x "/usr/sbin/ip6tables-restore" ] && [ ! -e "/sbin/ip6tables-restore" ]; then
    ln -sfn /usr/sbin/ip6tables-restore /sbin/ip6tables-restore
  fi
  ###
  ### Fix for iptables paths backward compatibility
  ###
}

###
### Prefer Devuan APT sources
###
_prefer_devuan_repositories() {
  # Prefer Devuan; force base-files from Devuan (handles lower version vs Debian).
  mkdir -p /etc/apt/preferences.d
  cat >/etc/apt/preferences.d/99-prefer-devuan <<'EOF'
Package: *
Pin: release o=Devuan
Pin-Priority: 700

Package: base-files
Pin: release o=Devuan
Pin-Priority: 1001
EOF
  _apt_clean_update
}

###
### Display not supported VM or bare metal info
###
_not_supported_virt() {
  echo
  echo "=== OOPS! ==="
  echo
  echo "You are running not supported virtualization system:"
  echo "  $1"
  echo
  echo "If you wish to try BOA on this system anyway,"
  echo "please create an empty control file:"
  echo "  /root/.allow.any.virt.cnf"
  echo
  echo "Please be aware that it may not work at all,"
  echo "or you can experience errors breaking BOA."
  echo
  echo "WARNING! BOA IS NOT DESIGNED TO RUN DIRECTLY ON A BARE METAL."
  echo "WARNING! IT IS VERY DANGEROUS AND THUS EXTREMELY BAD IDEA!"
  echo "WARNING! You are free to experiment but don't expect *ANY* support."
  echo
  echo "BOA is known to work well on:"
  echo
  echo " * Linux Containers (LXC)"
  echo " * Linux KVM guest"
  echo " * Microsoft Hyper-V"
  echo " * OpenVZ Containers"
  echo " * Parallels guest"
  echo " * Red Hat KVM guest"
  echo " * VirtualBox guest"
  echo " * VMware ESXi guest (but excluding vCloud Air)"
  echo " * VServer guest"
  echo " * Xen guest fully virtualized (HVM)"
  echo " * Xen guest"
  echo " * Xen paravirtualized guest domain"
  echo
  echo "Bye"
  echo
  exit 1
}

# --- internal: print message only in debug mode
_msg() {
  if [ "${_DEBUG_MODE}" = "YES" ]; then
    echo "[virt-what-fix] $*"
  fi
}

# --- internal: run virt-what under strace and parse the helper's exec path
_discover_with_strace() {
  local _path_found=""
  if ! command -v strace >/dev/null 2>&1; then
    _msg "strace not available, skipping strace-based discovery"
    echo ""
    return 0
  fi
  # Temporarily extend PATH so virt-what can exec the helper for strace to see.
  PATH="${PATH}:${_CANDIDATE_PATHS}" strace -f -qq -e trace=execve -o "${_TRACE}" virt-what >/dev/null 2>&1

  # mawk-safe parsing: pull the first quoted arg from execve("…") and check suffix
  if [ -s "${_TRACE}" ]; then
    _path_found=$(
      awk -v n="${_HELPER_NAME}" '
        /execve\("/ {
          # Find start of execve(" then extract up to next quote
          i = index($0, "execve(\"")
          if (i) {
            s = substr($0, i + 8)         # after execve("
            j = index(s, "\"")
            if (j) {
              p = substr(s, 1, j - 1)     # the path inside quotes
              if (p ~ ("/" n "$")) { print p; exit }
            }
          }
        }
      ' "${_TRACE}"
    )
  fi
  rm -f "${_TRACE}"

  if [ -n "${_path_found}" ] && [ -x "${_path_found}" ]; then
    _msg "strace discovered helper at: ${_path_found}"
    echo "${_path_found}"
    return 0
  fi
  _msg "strace discovery failed"
  echo ""
  return 0
}

# --- internal: dpkg-based discovery (Debian/Devuan)
_discover_with_dpkg() {
  local _p=""
  if command -v dpkg >/dev/null 2>&1; then
    _p=$(dpkg -L virt-what 2>/dev/null | grep -E "/${_HELPER_NAME}$" | head -n1)
    if [ -n "${_p}" ] && [ -x "${_p}" ]; then
      _msg "dpkg discovered helper at: ${_p}"
      echo "${_p}"
      return 0
    fi
  fi
  echo ""
  return 0
}

# --- internal: filesystem search fallback (bounded)
_discover_with_find() {
  local _p=""
  # Keep it bounded to /usr to stay fast/noisy-free.
  _p=$(find /usr -maxdepth 4 -type f -name "${_HELPER_NAME}" 2>/dev/null | head -n1)
  if [ -n "${_p}" ] && [ -x "${_p}" ]; then
    _msg "find discovered helper at: ${_p}"
    echo "${_p}"
    return 0
  fi
  echo ""
  return 0
}

# --- main: ensure symlink
_ensure_virt_what_helper_symlink() {
  # If the symlink already exists and is working, nothing to do.
  if [ -L "${_SYMLINK}" ] && [ -x "${_SYMLINK}" ] && [ -e "$(readlink -f "${_SYMLINK}")" ]; then
    _msg "Symlink already present and valid: ${_SYMLINK} -> $(readlink -f "${_SYMLINK}")"
    return 0
  fi

  local _helper_path=""
  _helper_path="$(_discover_with_strace)"
  if [ -z "${_helper_path}" ]; then
    _helper_path="$(_discover_with_dpkg)"
  fi
  if [ -z "${_helper_path}" ]; then
    _helper_path="$(_discover_with_find)"
  fi

  if [ -z "${_helper_path}" ]; then
    echo "ERROR: Could not locate ${_HELPER_NAME} anywhere under /usr." 1>&2
    return 1
  fi

  # Safety: if a non-symlink file already exists at the target, back it up once.
  if [ -e "${_SYMLINK}" ] && [ ! -L "${_SYMLINK}" ]; then
    _msg "Backing up existing non-symlink at ${_SYMLINK} to ${_SYMLINK}.orig"
    mv -f "${_SYMLINK}" "${_SYMLINK}.orig"
  fi

  ln -sfn "${_helper_path}" "${_SYMLINK}"
  if [ -x "${_SYMLINK}" ]; then
    _msg "Symlink created: ${_SYMLINK} -> ${_helper_path}"
    return 0
  else
    echo "ERROR: Failed to create working symlink ${_SYMLINK} -> ${_helper_path}" 1>&2
    return 2
  fi
}

###
### Fix VM system detection
###
_fix_virt_what() {
  _VIRT_TEST="$(which virt-what)"
  if [ -n "${_VIRT_TEST}" ] && [ -x "${_VIRT_TEST}" ]; then
    _SHELL_TEST_A=$(grep -I -o "\#\!.*/usr/bin/sh" ${_VIRT_TEST} 2>&1)
    _SHELL_TEST_B=$(grep -I -o "\#\!.*/bin/sh" ${_VIRT_TEST} 2>&1)
    if [[ "${_SHELL_TEST_A}" =~ "/usr/bin/sh" ]]; then
      sed -i "s/\/usr\/bin\/sh/\/bin\/dash/g" ${_VIRT_TEST}
    fi
    if [[ "${_SHELL_TEST_B}" =~ "/bin/sh" ]]; then
      sed -i "s/\/bin\/sh/\/bin\/dash/g" ${_VIRT_TEST}
    fi
    _HELPER_NAME="virt-what-cpuid-helper"
    _SYMLINK="/usr/sbin/${_HELPER_NAME}"
    _TRACE="/tmp/virtwhat.$$.strace"
    # Extra dirs we temporarily expose to PATH so virt-what can exec the helper for strace discovery
    _CANDIDATE_PATHS="/usr/libexec:/usr/lib/x86_64-linux-gnu:/usr/lib64/virt-what:/usr/lib/virt-what"
    if [ ! -e "${_SYMLINK}" ]; then
      echo "INFO: virt-what tool requires small update, fixing..."
      if ! command -v strace &> /dev/null; then
        _apt_clean_update
        apt-get install strace ${_aptYesUnth}
      fi
      _ensure_virt_what_helper_symlink
    fi
  fi
}

###
### Fix or install VM system detection
###
_fix_or_install_virt_what() {
  _VIRT_TEST="$(which virt-what)"
  if [ -n "${_VIRT_TEST}" ] && [ -x "${_VIRT_TEST}" ]; then
    _fix_virt_what
  else
    echo "INFO: installing required virt-what tool ..."
    if [ ! -e "/etc/apt/apt.conf.d/00sandboxoff" ] \
      && [ -e "/etc/apt/apt.conf.d" ]; then
      echo "APT::Sandbox::User \"root\";" > /etc/apt/apt.conf.d/00sandboxoff
    fi
    _apt_clean_update
    apt-get install virt-what ${_aptYesUnth}
    wait
    _fix_virt_what
  fi
}

_check_virt() {
  _fix_or_install_virt_what
  _VIRT_TOOL="$(which virt-what)"
  if [ -x "${_VIRT_TOOL}" ]; then
    _VIRT_TEST=$(virt-what)
    _VIRT_TEST=$(echo -n ${_VIRT_TEST} | fmt -su -w 2500 2>&1)
    if [[ "${_VIRT_TEST}" =~ "program not found" ]]; then
      echo "ERROR: virt-what says: ${_VIRT_TEST}"
      echo "ERROR: virt-what detection fails for unknown reason"
    fi
    if [ ! -e "/root/.allow.any.virt.cnf" ]; then
      if [ -e "/proc/self/status" ]; then
        _VS_GUEST_TEST=$(grep -E "VxID:[[:space:]]*[0-9]{2,}$" /proc/self/status 2> /dev/null)
        _VS_HOST_TEST=$(grep -E "VxID:[[:space:]]*0$" /proc/self/status 2> /dev/null)
      fi
      if [ ! -z "${_VS_HOST_TEST}" ] || [ ! -z "${_VS_GUEST_TEST}" ]; then
        if [ -z "${_VS_HOST_TEST}" ] && [ ! -z "${_VS_GUEST_TEST}" ]; then
          _VIRT_IS="Linux VServer guest"
        else
          if [ ! -z "${_VS_HOST_TEST}" ]; then
            _not_supported_virt "Linux VServer host"
          else
            _not_supported_virt "unknown / not a virtual machine"
          fi
        fi
      else
        if [ -z "${_VIRT_TEST}" ] || [ "${_VIRT_TEST}" = "0" ]; then
          _not_supported_virt "unknown / not a virtual machine"
        elif [[ "${_VIRT_TEST}" =~ "xen-dom0" ]]; then
          _not_supported_virt "Xen privileged domain"
        elif [[ "${_VIRT_TEST}" =~ "linux_vserver-host" ]]; then
          _not_supported_virt "Linux VServer host"
        else
          if [[ "${_VIRT_TEST}" =~ "xen xen-hvm" ]]; then
            _VIRT_TEST="xen-hvm"
          elif [[ "${_VIRT_TEST}" =~ "xen xen-domU" ]]; then
            _VIRT_TEST="xen-domU"
          elif [[ "${_VIRT_TEST}" =~ "virtualbox kvm" ]]; then
            _VIRT_TEST="virtualbox"
          elif [[ "${_VIRT_TEST}" =~ "hyperv qemu" ]]; then
            _VIRT_TEST="hyperv"
          elif [[ "${_VIRT_TEST}" =~ "kvm aws" ]]; then
            _VIRT_TEST="kvm"
          elif [[ "${_VIRT_TEST}" =~ "redhat kvm" ]]; then
            _VIRT_TEST="redhat-kvm"
          elif [[ "${_VIRT_TEST}" =~ "openvz lxc" ]]; then
            _VIRT_TEST="openvz"
          fi
          case "${_VIRT_TEST}" in
            hyperv)      _VIRT_IS="Microsoft Hyper-V" ;;
            kvm)         _VIRT_IS="Linux KVM guest" ;;
            lxc)         _VIRT_IS="Linux Containers (LXC)" ;;
            openvz)      _VIRT_IS="OpenVZ Containers" ;;
            parallels)   _VIRT_IS="Parallels guest" ;;
            redhat-kvm)  _VIRT_IS="Red Hat KVM guest" ;;
            virtualbox)  _VIRT_IS="VirtualBox guest" ;;
            vmware)      _VIRT_IS="VMware ESXi guest" ;;
            xen-domU)    _VIRT_IS="Xen paravirtualized guest domain" ;;
            xen-hvm)     _VIRT_IS="Xen guest fully virtualized (HVM)" ;;
            xen)         _VIRT_IS="Xen guest" ;;
            *)  _not_supported_virt "${_VIRT_TEST}"
            ;;
          esac
        fi
      fi
    else
      if [ -z "${_VIRT_TEST}" ] || [ "${_VIRT_TEST}" = "0" ]; then
        _VIRT_TEST="unknown / not a virtual machine"
      fi
    fi
  fi
}

###
### Make local OpenSSL new/legacy ssl/certs symlinked to system ssl/certs
###
_fix_sync_system_ssl_certs() {
  if [ -e "/etc/ssl/certs/ca-certificates.crt" ] \
    && [ ! -e "/usr/local/ssl3/.old-certs" ] \
    && [ -d "/usr/local/ssl3/certs" ] \
    && [ ! -L "/usr/local/ssl3/certs" ]; then
    mv -f /usr/local/ssl3/certs /usr/local/ssl3/.old-certs
    ln -sfn /etc/ssl/certs /usr/local/ssl3/certs
  fi
  if [ -e "/etc/ssl/certs/ca-certificates.crt" ] \
    && [ ! -e "/usr/local/ssl/.old-certs" ] \
    && [ -d "/usr/local/ssl/certs" ] \
    && [ ! -L "/usr/local/ssl/certs" ]; then
    mv -f /usr/local/ssl/certs /usr/local/ssl/.old-certs
    ln -sfn /etc/ssl/certs /usr/local/ssl/certs
  fi
}

_update_agents() {

  _if_hosted_sys
  if [ "${_hostedSys}" = "YES" ]; then
    if [ ! -e "/root/.extended.firewall.exceptions.cnf" ]; then
      echo host8 > /root/.extended.firewall.exceptions.cnf
    fi
  fi

  if [ "${_VMFAMILY}" = "HOSTED" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -d "/data/u" ] \
    && [ -e "/var/xdrago" ]; then
    [ ! -e "/root/.fast.cron.cnf" ] && echo ON > /root/.fast.cron.cnf
    _PrTestPower=$(grep "POWER" /root/.*.octopus.cnf 2>&1)
    _PrTestPhantom=$(grep "PHANTOM" /root/.*.octopus.cnf 2>&1)
    _PrTestCluster=$(grep "CLUSTER" /root/.*.octopus.cnf 2>&1)
    _PrTestUltra=$(grep "ULTRA" /root/.*.octopus.cnf 2>&1)
    _PrTestMonster=$(grep "MONSTER" /root/.*.octopus.cnf 2>&1)
    _InTest=$(ls /data/disk/*/static/control/cli.info | wc -l 2>&1)
    _SQL_PSWD=$(cat /root/.my.pass.txt 2>/dev/null | tr -d '\n')
    if [ "${_InTest}" -lt 9 ] \
      && [[ ! "${_PrTestPower}" =~ "POWER" ]] \
      && [[ ! "${_PrTestPhantom}" =~ "PHANTOM" ]] \
      && [[ ! "${_PrTestCluster}" =~ "CLUSTER" ]] \
      && [[ ! "${_PrTestUltra}" =~ "ULTRA" ]] \
      && [[ ! "${_PrTestMonster}" =~ "MONSTER" ]]; then
      [ ! -e "/root/.fast.cron.cnf" ] && echo ${_InTest} > /root/.fast.cron.cnf
      [ -e "/root/.hr.monitor.cnf" ] && rm -f /root/.hr.monitor.cnf
      [ -e "/root/.slow.cron.cnf" ] && [ ! -e "/root/.slow.cron.cnf.protected" ] && rm -f /root/.slow.cron.cnf
      [ -e "/root/.tg.cnf" ] && rm -f /root/.tg.cnf
      mysql -u root -e "SET GLOBAL max_connect_errors = 555;"
      mysql -u root -e "SET GLOBAL max_connections = 111;"
      mysql -u root -e "SET GLOBAL max_user_connections = 111;"
      mysql -u root -e "SET GLOBAL group_concat_max_len = 10000;"
    fi
    if [ "${_InTest}" -ge 9 ] && [ "${_InTest}" -le 50 ]; then
      [ ! -e "/root/.fast.cron.cnf" ] && echo ${_InTest} > /root/.fast.cron.cnf
      [ -e "/root/.hr.monitor.cnf" ] && rm -f /root/.hr.monitor.cnf
      [ -e "/root/.slow.cron.cnf" ] && [ ! -e "/root/.slow.cron.cnf.protected" ] && rm -f /root/.slow.cron.cnf
      [ -e "/root/.tg.cnf" ] && rm -f /root/.tg.cnf
      mysql -u root -e "SET GLOBAL max_connect_errors = 777;"
      mysql -u root -e "SET GLOBAL max_connections = 555;"
      mysql -u root -e "SET GLOBAL max_user_connections = 111;"
      mysql -u root -e "SET GLOBAL group_concat_max_len = 10000;"
    fi
    if [ "${_InTest}" -gt 50 ]; then
      [ -e "/root/.fast.cron.cnf" ] && rm -f /root/.fast.cron.cnf
      [ ! -e "/root/.tg.cnf" ] && echo ${_InTest} > /root/.tg.cnf
      [ ! -e "/root/.hr.monitor.cnf" ] && echo ${_InTest} > /root/.hr.monitor.cnf
      [ ! -e "/root/.slow.cron.cnf" ] && echo ${_InTest} > /root/.slow.cron.cnf
      mysql -u root -e "SET GLOBAL max_connect_errors = 999;"
      mysql -u root -e "SET GLOBAL max_connections = 777;"
      mysql -u root -e "SET GLOBAL max_user_connections = 111;"
      mysql -u root -e "SET GLOBAL group_concat_max_len = 10000;"
    fi
    if [[ "${_PrTestPower}" =~ "POWER" ]]; then
      [ ! -e "/root/.tg.cnf" ] && echo ${_InTest} > /root/.tg.cnf
      [ ! -e "/root/.fast.cron.cnf" ] && echo ${_InTest} > /root/.fast.cron.cnf
      [ -e "/root/.hr.monitor.cnf" ] && rm -f /root/.hr.monitor.cnf
      [ -e "/root/.slow.cron.cnf" ] && [ ! -e "/root/.slow.cron.cnf.protected" ] && rm -f /root/.slow.cron.cnf
      mysql -u root -e "SET GLOBAL max_connect_errors = 555;"
      mysql -u root -e "SET GLOBAL max_connections = 333;"
      mysql -u root -e "SET GLOBAL max_user_connections = 111;"
      mysql -u root -e "SET GLOBAL group_concat_max_len = 10000;"
    fi
    if [[ "${_PrTestPhantom}" =~ "PHANTOM" ]]; then
      [ ! -e "/root/.tg.cnf" ] && echo ${_InTest} > /root/.tg.cnf
      [ ! -e "/root/.fast.cron.cnf" ] && echo ${_InTest} > /root/.fast.cron.cnf
      [ -e "/root/.hr.monitor.cnf" ] && rm -f /root/.hr.monitor.cnf
      [ -e "/root/.slow.cron.cnf" ] && [ ! -e "/root/.slow.cron.cnf.protected" ] && rm -f /root/.slow.cron.cnf
      mysql -u root -e "SET GLOBAL max_connect_errors = 777;"
      mysql -u root -e "SET GLOBAL max_connections = 555;"
      mysql -u root -e "SET GLOBAL max_user_connections = 333;"
      mysql -u root -e "SET GLOBAL group_concat_max_len = 10000;"
    fi
    if [[ "${_PrTestCluster}" =~ "CLUSTER" ]]; then
      [ ! -e "/root/.tg.cnf" ] && echo ${_InTest} > /root/.tg.cnf
      [ ! -e "/root/.fast.cron.cnf" ] && echo ${_InTest} > /root/.fast.cron.cnf
      [ -e "/root/.hr.monitor.cnf" ] && rm -f /root/.hr.monitor.cnf
      [ -e "/root/.slow.cron.cnf" ] && [ ! -e "/root/.slow.cron.cnf.protected" ] && rm -f /root/.slow.cron.cnf
      mysql -u root -e "SET GLOBAL max_connect_errors = 999;"
      mysql -u root -e "SET GLOBAL max_connections = 777;"
      mysql -u root -e "SET GLOBAL max_user_connections = 555;"
      mysql -u root -e "SET GLOBAL group_concat_max_len = 10000;"
    fi
    mysql -u root -e "SET GLOBAL optimizer_switch='derived_merge=off';"
    mysql -u root -e "SET GLOBAL sort_buffer_size = 262144;"
    if [ -e "/root/.tg.cnf" ]; then
      if [ ! -e "/root/.fixed_fpm_workers.cnf" ]; then
        sed -i "s/^_PHP_FPM_WORKERS=.*/_PHP_FPM_WORKERS=100/g" ${_barCnf}
        touch /root/.fixed_fpm_workers.cnf
      fi
    fi
    if [ ! -e "/root/.high_traffic.cnf" ]; then
      echo ${_InTest} > /root/.high_traffic.cnf
      echo ${_InTest} > /root/.no.swap.clear.cnf
    fi
    [ -e "/root/.randomize_duplicity_full_backup_day.cnf" ] && rm -f /root/.randomize_duplicity_full_backup_day.cnf
    [ -e "/root/.skip_duplicity_monthly_cleanup.cnf" ] && rm -f /root/.skip_duplicity_monthly_cleanup.cnf
    [ -e "/root/.my.batch_innodb.cnf" ] && rm -f /root/.my.batch_innodb.cnf
    [ -e "/root/.batch_innodb.cnf" ] && rm -f /root/.batch_innodb.cnf
    [ -e "/root/.force.drupalgeddon.cnf" ] && rm -f /root/.force.drupalgeddon.cnf
    [ -e "/root/.skip_cleanup.cnf" ] && rm -f /root/.skip_cleanup.cnf
    [ -e "/root/.giant_traffic.cnf" ] && rm -f /root/.giant_traffic.cnf
    [ -e "/root/.default.cnf" ] && rm -f /root/.default.cnf
    [ -e "/root/.debug.cnf" ] && rm -f /root/.debug.cnf
    if [ -e "/data/conf/override.global.inc" ] \
      && [ ! -e "/data/conf/.prev6.override.global.inc.off" ]; then
      mv -f /data/conf/override.global.inc /data/conf/.prev6.override.global.inc.off
    fi
#     if [ ! -e "/data/conf/override.global.inc" ]; then
#       echo "<?php" > /data/conf/override.global.inc.tmp
#       echo "" >> /data/conf/override.global.inc.tmp
#       echo "\$use_valkey = TRUE;" >> /data/conf/override.global.inc.tmp
#       chmod 644 /data/conf/override.global.inc.tmp
#       mv -f /data/conf/override.global.inc.tmp /data/conf/override.global.inc
#     fi
  fi


  if [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then

    _pthCtrl="/root/.remote_backups/ctrl"
    if [ "${_tRee}" = "pro" ] || [ "${_tRee}" = "dev" ]; then
      [ ! -e "${_pthCtrl}" ] && mkdir -p ${_pthCtrl}
      [ ! -e "/root/.remote_backups/run" ] && mkdir -p /root/.remote_backups/run
    else
      rm -rf /root/.remote_backups
    fi

    [ ! -e "/var/xdrago/monitor/check" ] && mkdir -p /var/xdrago/monitor/check
    [ ! -e "/var/xdrago/monitor/log" ] && mkdir -p /var/xdrago/monitor/log

    if [ ! -e "${_pthLog}/.force.f89.${_tRee}.${_xSrl}.ctrl" ]; then
      rm -f ${_pthLog}/*.ctrl.*.pid
      touch ${_pthLog}/.force.f89.${_tRee}.${_xSrl}.ctrl
    fi

    [ ! -e "/var/xdrago/checksql.pl" ] && rm -f ${_pthLog}/checksql.pl.ctrl.*.pid
    [ ! -e "/var/xdrago/clear.sh" ] && rm -f ${_pthLog}/clear.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/daily.sh" ] && rm -f ${_pthLog}/daily.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/graceful.sh" ] && rm -f ${_pthLog}/graceful.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/guest-fire.sh" ] && rm -f ${_pthLog}/guest-fire.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/guest-water.sh" ] && rm -f ${_pthLog}/guest-water.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/ip_access.sh" ] && rm -f ${_pthLog}/ip_access.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/manage_ltd_users.sh" ] && rm -f ${_pthLog}/manage_ltd_users.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/manage_solr_config.sh" ] && rm -f ${_pthLog}/manage_solr_config.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/minute.sh" ] && rm -f ${_pthLog}/minute.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/move_sql.sh" ] && rm -f ${_pthLog}/move_sql.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/mysql_backup.sh" ] && rm -f ${_pthLog}/mysql_backup.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/mysql_cleanup.sh" ] && rm -f ${_pthLog}/mysql_cleanup.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/mysql_cluster_backup.sh" ] && rm -f ${_pthLog}/mysql_cluster_backup.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/mysql_repair.sh" ] && rm -f ${_pthLog}/mysql_repair.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/proc_num_ctrl.pl" ] && rm -f ${_pthLog}/proc_num_ctrl.pl.ctrl.*.pid
    [ ! -e "/var/xdrago/purge_binlogs.sh" ] && rm -f ${_pthLog}/purge_binlogs.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/runner.sh" ] && rm -f ${_pthLog}/runner.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/second.sh" ] && rm -f ${_pthLog}/second.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/usage.sh" ] && rm -f ${_pthLog}/usage.sh.ctrl.*.pid

    [ ! -e "/var/xdrago/monitor/check/java.sh" ] && rm -f ${_pthLog}/java.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/mysql.sh" ] && rm -f ${_pthLog}/mysql.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/nginx.sh" ] && rm -f ${_pthLog}/nginx.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/php.sh" ] && rm -f ${_pthLog}/php.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/valkey.sh" ] && rm -f ${_pthLog}/valkey.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/redis.sh" ] && rm -f ${_pthLog}/redis.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/scan_nginx.sh" ] && rm -f ${_pthLog}/scan_nginx.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/system.sh" ] && rm -f ${_pthLog}/system.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/unbound.sh" ] && rm -f ${_pthLog}/unbound.sh.ctrl.*.pid

    [ ! -e "/var/xdrago/monitor/check/escapecheck.sh" ] && rm -f ${_pthLog}/escapecheck.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/hackcheck.sh" ] && rm -f ${_pthLog}/hackcheck.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/hackftp.sh" ] && rm -f ${_pthLog}/hackftp.sh.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/segfault_alert.pl" ] && rm -f ${_pthLog}/segfault_alert.pl.ctrl.*.pid
    [ ! -e "/var/xdrago/monitor/check/sqlcheck.pl" ] && rm -f ${_pthLog}/sqlcheck.pl.ctrl.*.pid

    [ -e "/var/xdrago/proc_num_ctrl.cgi" ] && rm -f /var/xdrago/proc_num_ctrl.cgi
    [ -e "/var/xdrago/checksql.cgi" ] && rm -f /var/xdrago/checksql.cgi
    [ -e "/var/xdrago/mysql_hourly.sh" ] && rm -f /var/xdrago/mysql_hourly.sh

    [ -e "/var/xdrago/monitor/check/sqlcheck" ] && rm -f ${_pthLog}/*.ctrl.*.pid
    [ -e "/var/xdrago/monitor/check/sqlcheck" ] && rm -f /var/xdrago/monitor/check/*

    [ -e "/var/xdrago/monitor/hackcheck.archive.log" ] && rm -f /var/xdrago/monitor/.scan_nginx_arch*
    [ -e "/var/xdrago/monitor/hackcheck.archive.log" ] && mv -f /var/xdrago/monitor/*.log /var/xdrago/monitor/log/
  fi

  if [ -e "/root/.remote_backups/schedule/backup_schedule.txt" ] \
    && [ -d "/var/aegir/drush" ]; then
    if grep -q "Out of memory: Killed process.*duplicity" /var/log/iptables.log; then
     if [ ! -e "/root/.remote_backups/schedule/backup_schedule.txt-off" ]; then
       cp -a /root/.remote_backups/schedule/backup_schedule.txt /root/.remote_backups/schedule/backup_schedule.txt-off
       echo "# Backup schedule (service user) OFF" > /root/.remote_backups/schedule/backup_schedule.txt
       chattr +i /root/.remote_backups/schedule/backup_schedule.txt
     fi
    else
      if [ -e "/root/.remote_backups/schedule/backup_schedule.txt-off" ]; then
        chattr -i /root/.remote_backups/schedule/backup_schedule.txt
        rm -f /root/.remote_backups/schedule/backup_schedule.txt
        mv /root/.remote_backups/schedule/backup_schedule.txt-off /root/.remote_backups/schedule/backup_schedule.txt
      fi
    fi
    if [ "$(pgrep -fc duplicity)" -gt 0 ] \
      && [ "$(pgrep -fc dcysetup)" -lt 1 ] \
      && [ "$(pgrep -fc mybackup)" -lt 1 ] \
      && [ "$(pgrep -fc multiback)" -lt 1 ]; then
      pkill -9 -f duplicity
      rm -rf /tmp/duplicity*
      rm -rf /root/.cache/duplicity/*/duplicity-*tempdir
      rm -f /root/.cache/duplicity/*/lockfile
      echo "$(date) Orphaned duplicity processes killed" >> /var/log/duplicity-cleanup.log
    fi
  fi

  if ! grep -q "OFF" ${_optBin}/lock.inc; then
    rm -f ${_pthLog}/lock.inc.sh.ctrl.*
  fi
  if [ ! -e "${_optBin}/lock.inc" ] \
    || [ ! -e "${_pthLog}/lock.inc.sh.ctrl.f98.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc foobar)
    if (( _CNT > 0 )); then
      echo "The foobar is running!"
    else
      if [ -e "${_optBin}/lock.inc" ]; then
        mv -f ${_optBin}/lock.inc ${_optBin}/lock.inc.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/lock.inc" -o ${_optBin}/lock.inc
      if [ -e "${_optBin}/lock.inc" ]; then
        chmod 700 ${_optBin}/lock.inc
        chown root:root ${_optBin}/lock.inc
        touch ${_pthLog}/lock.inc.sh.ctrl.f98.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/lock.inc.old" ]; then
          mv -f ${_optBin}/lock.inc.old ${_optBin}/lock.inc
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/vmnetfix" ] \
    || [ ! -e "${_pthLog}/vmnetfix.sh.ctrl.f89.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc vmnetfix)
    if (( _CNT > 0 )); then
      echo "The vmnetfix is running!"
    else
      if [ ! -e "/etc/init.d/networking" ]; then
        mkdir -p /etc/init.d
        curl ${_crlGet} "${_urlHmr}/conf/network/networking" -o /etc/init.d/networking
        chmod 0755 /etc/init.d/networking
        chown root:root /etc/init.d/networking
        update-rc.d networking defaults >/dev/null 2>&1 || true
      fi
      if [ -e "${_optBin}/vmnetfix" ]; then
        mv -f ${_optBin}/vmnetfix ${_optBin}/vmnetfix.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/vmnetfix" -o ${_optBin}/vmnetfix
      if [ -e "${_optBin}/vmnetfix" ]; then
        chmod 700 ${_optBin}/vmnetfix
        chown root:root ${_optBin}/vmnetfix
        touch ${_pthLog}/vmnetfix.sh.ctrl.f89.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/vmnetfix.old" ]; then
          mv -f ${_optBin}/vmnetfix.old ${_optBin}/vmnetfix
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/screenfetch" ] \
    || [ ! -e "${_pthLog}/screenfetch.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc screenfetch)
    if (( _CNT > 0 )); then
      echo "The screenfetch is running!"
    else
      if [ -e "${_optBin}/screenfetch" ]; then
        mv -f ${_optBin}/screenfetch ${_optBin}/screenfetch.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/screenfetch" -o ${_optBin}/screenfetch
      if [ -e "${_optBin}/screenfetch" ]; then
        chmod 700 ${_optBin}/screenfetch
        chown root:root ${_optBin}/screenfetch
        touch ${_pthLog}/screenfetch.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/screenfetch.old" ]; then
          mv -f ${_optBin}/screenfetch.old ${_optBin}/screenfetch
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/fixrepo" ] \
    || [ ! -e "${_pthLog}/fixrepo.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc fixrepo)
    if (( _CNT > 0 )); then
      echo "The fixrepo is running!"
    else
      if [ -e "${_optBin}/fixrepo" ]; then
        mv -f ${_optBin}/fixrepo ${_optBin}/fixrepo.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/fixrepo" -o ${_optBin}/fixrepo
      if [ -e "${_optBin}/fixrepo" ]; then
        chmod 700 ${_optBin}/fixrepo
        chown root:root ${_optBin}/fixrepo
        touch ${_pthLog}/fixrepo.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/fixrepo.old" ]; then
          mv -f ${_optBin}/fixrepo.old ${_optBin}/fixrepo
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/renameaegirhost" ] \
    || [ ! -e "${_pthLog}/renameaegirhost.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc renameaegirhost)
    if (( _CNT > 0 )); then
      echo "The renameaegirhost is running!"
    else
      if [ -e "${_optBin}/renameaegirhost" ]; then
        mv -f ${_optBin}/renameaegirhost ${_optBin}/renameaegirhost.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/renameaegirhost" -o ${_optBin}/renameaegirhost
      if [ -e "${_optBin}/renameaegirhost" ]; then
        chmod 700 ${_optBin}/renameaegirhost
        chown root:root ${_optBin}/renameaegirhost
        touch ${_pthLog}/renameaegirhost.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/renameaegirhost.old" ]; then
          mv -f ${_optBin}/renameaegirhost.old ${_optBin}/renameaegirhost
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/autosymlink" ] \
    || [ ! -e "${_pthLog}/autosymlink.sh.ctrl.f93.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc autosymlink)
    if (( _CNT > 0 )); then
      echo "The autosymlink is running!"
    else
      if [ -e "${_optBin}/autosymlink" ]; then
        mv -f ${_optBin}/autosymlink ${_optBin}/autosymlink.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/autosymlink" -o ${_optBin}/autosymlink
      if [ -e "${_optBin}/autosymlink" ]; then
        chmod 700 ${_optBin}/autosymlink
        chown root:root ${_optBin}/autosymlink
        touch ${_pthLog}/autosymlink.sh.ctrl.f93.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/autosymlink.old" ]; then
          mv -f ${_optBin}/autosymlink.old ${_optBin}/autosymlink
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/updatesymlinks" ] \
    || [ ! -e "${_pthLog}/updatesymlinks.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc updatesymlinks)
    if (( _CNT > 0 )); then
      echo "The updatesymlinks is running!"
    else
      if [ -e "${_optBin}/updatesymlinks" ]; then
        mv -f ${_optBin}/updatesymlinks ${_optBin}/updatesymlinks.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/updatesymlinks" -o ${_optBin}/updatesymlinks
      if [ -e "${_optBin}/updatesymlinks" ]; then
        chmod 700 ${_optBin}/updatesymlinks
        chown root:root ${_optBin}/updatesymlinks
        touch ${_pthLog}/updatesymlinks.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/updatesymlinks.old" ]; then
          mv -f ${_optBin}/updatesymlinks.old ${_optBin}/updatesymlinks
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/aptcleanup" ] \
    || [ ! -e "${_pthLog}/aptcleanup.sh.ctrl.f97.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc aptcleanup)
    if (( _CNT > 0 )); then
      echo "The aptcleanup is running!"
    else
      if [ -e "${_optBin}/aptcleanup" ]; then
        mv -f ${_optBin}/aptcleanup ${_optBin}/aptcleanup.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/aptcleanup" -o ${_optBin}/aptcleanup
      if [ -e "${_optBin}/aptcleanup" ]; then
        chmod 700 ${_optBin}/aptcleanup
        chown root:root ${_optBin}/aptcleanup
        touch ${_pthLog}/aptcleanup.sh.ctrl.f97.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/aptcleanup.old" ]; then
          mv -f ${_optBin}/aptcleanup.old ${_optBin}/aptcleanup
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/loadguard" ] \
    || [ ! -e "${_pthLog}/loadguard.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc xloadguard)
    if (( _CNT > 0 )); then
      echo "The xloadguard is running!"
    else
      if [ -e "${_optBin}/loadguard" ]; then
        mv -f ${_optBin}/loadguard ${_optBin}/loadguard.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/loadguard" -o ${_optBin}/loadguard
      if [ -e "${_optBin}/loadguard" ]; then
        chmod 700 ${_optBin}/loadguard
        chown root:root ${_optBin}/loadguard
        touch ${_pthLog}/loadguard.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/loadguard.old" ]; then
          mv -f ${_optBin}/loadguard.old ${_optBin}/loadguard
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/ffmirror" ] \
    || [ ! -e "${_pthLog}/ffmirror.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc xffmirror)
    if (( _CNT > 0 )); then
      echo "The xffmirror is running!"
    else
      if [ -e "${_optBin}/ffmirror" ]; then
        mv -f ${_optBin}/ffmirror ${_optBin}/ffmirror.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/ffmirror" -o ${_optBin}/ffmirror
      if [ -e "${_optBin}/ffmirror" ]; then
        chmod 700 ${_optBin}/ffmirror
        chown root:root ${_optBin}/ffmirror
        touch ${_pthLog}/ffmirror.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/ffmirror.old" ]; then
          mv -f ${_optBin}/ffmirror.old ${_optBin}/ffmirror
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/ffdevuan" ] \
    || [ ! -e "${_pthLog}/ffdevuan.sh.ctrl.f95.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc xffdevuan)
    if (( _CNT > 0 )); then
      echo "The xffdevuan is running!"
    else
      if [ -e "${_optBin}/ffdevuan" ]; then
        mv -f ${_optBin}/ffdevuan ${_optBin}/ffdevuan.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/ffdevuan" -o ${_optBin}/ffdevuan
      if [ -e "${_optBin}/ffdevuan" ]; then
        chmod 700 ${_optBin}/ffdevuan
        chown root:root ${_optBin}/ffdevuan
        touch ${_pthLog}/ffdevuan.sh.ctrl.f95.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/ffdevuan.old" ]; then
          mv -f ${_optBin}/ffdevuan.old ${_optBin}/ffdevuan
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/webserver" ] \
    || [ ! -e "${_pthLog}/webserver.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc xwebserver)
    if (( _CNT > 0 )); then
      echo "The xwebserver is running!"
    else
      if [ -e "${_optBin}/webserver" ]; then
        mv -f ${_optBin}/webserver ${_optBin}/webserver.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/webserver" -o ${_optBin}/webserver
      if [ -e "${_optBin}/webserver" ]; then
        chmod 700 ${_optBin}/webserver
        chown root:root ${_optBin}/webserver
        touch ${_pthLog}/webserver.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/webserver.old" ]; then
          mv -f ${_optBin}/webserver.old ${_optBin}/webserver
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/xboa" ] \
    || [ ! -e "${_pthLog}/xboa.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc /local/bin/xboa)
    if (( _CNT > 0 )); then
      echo "The xboa is running!"
    else
      if [ -e "${_optBin}/xboa" ]; then
        mv -f ${_optBin}/xboa ${_optBin}/xboa.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/xboa" -o ${_optBin}/xboa
      if [ -e "${_optBin}/xboa" ]; then
        chmod 700 ${_optBin}/xboa
        chown root:root ${_optBin}/xboa
        touch ${_pthLog}/xboa.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/xboa.old" ]; then
          mv -f ${_optBin}/xboa.old ${_optBin}/xboa
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/boa" ] \
    || [ ! -e "${_pthLog}/boa.sh.ctrl.f89.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc /local/bin/boa)
    if (( _CNT > 0 )); then
      echo "The boa is running!"
    else
      if [ -e "${_optBin}/boa" ]; then
        mv -f ${_optBin}/boa ${_optBin}/boa.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/boa" -o ${_optBin}/boa
      if [ -e "${_optBin}/boa" ]; then
        chmod 700 ${_optBin}/boa
        chown root:root ${_optBin}/boa
        touch ${_pthLog}/boa.sh.ctrl.f89.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/boa.old" ]; then
          mv -f ${_optBin}/boa.old ${_optBin}/boa
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/barracuda" ] \
    || [ ! -e "${_pthLog}/barracuda.sh.ctrl.f93.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc /local/bin/barracuda)
    if (( _CNT > 0 )); then
      echo "The barracuda is running!"
    else
      if [ -e "${_optBin}/barracuda" ]; then
        mv -f ${_optBin}/barracuda ${_optBin}/barracuda.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/barracuda" -o ${_optBin}/barracuda
      if [ -e "${_optBin}/barracuda" ]; then
        chmod 700 ${_optBin}/barracuda
        chown root:root ${_optBin}/barracuda
        touch ${_pthLog}/barracuda.sh.ctrl.f93.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/barracuda.old" ]; then
          mv -f ${_optBin}/barracuda.old ${_optBin}/barracuda
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/octopus" ] \
    || [ ! -e "${_pthLog}/octopus.sh.ctrl.f89.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc /local/bin/octopus)
    if (( _CNT > 0 )); then
      echo "The octopus is running!"
    else
      if [ -e "${_optBin}/octopus" ]; then
        mv -f ${_optBin}/octopus ${_optBin}/octopus.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/octopus" -o ${_optBin}/octopus
      if [ -e "${_optBin}/octopus" ]; then
        chmod 700 ${_optBin}/octopus
        chown root:root ${_optBin}/octopus
        touch ${_pthLog}/octopus.sh.ctrl.f89.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/octopus.old" ]; then
          mv -f ${_optBin}/octopus.old ${_optBin}/octopus
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/perftest" ] \
    || [ ! -L "${_usrBin}/perftest" ] \
    || [ ! -e "${_pthLog}/perftest.sh.ctrl.f97.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc /local/bin/perftest)
    if (( _CNT > 0 )); then
      echo "The perftest is running!"
    else
      if [ -e "${_optBin}/perftest" ]; then
        mv -f ${_optBin}/perftest ${_optBin}/perftest.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/perftest" -o ${_optBin}/perftest
      if [ -e "${_optBin}/perftest" ]; then
        chmod 700 ${_optBin}/perftest
        chown root:root ${_optBin}/perftest
        ln -sf ${_optBin}/perftest ${_usrBin}/perftest
        rm -f ${_pthLog}/perftest.sh.ctrl.*
        touch ${_pthLog}/perftest.sh.ctrl.f97.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/perftest.old" ]; then
          mv -f ${_optBin}/perftest.old ${_optBin}/perftest
        fi
      fi
    fi
  fi

  if [ ! -e "${_optBin}/aptfast" ] \
    || [ ! -e "${_pthLog}/aptfast.sh.ctrl.f98.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc /local/bin/aptfast)
    if (( _CNT > 0 )); then
      echo "The aptfast is running!"
    else
      if [ -e "${_optBin}/aptfast" ]; then
        mv -f ${_optBin}/aptfast ${_optBin}/aptfast.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/aptfast" -o ${_optBin}/aptfast
      if [ -e "${_optBin}/aptfast" ]; then
        chmod 700 ${_optBin}/aptfast
        chown root:root ${_optBin}/aptfast
        touch ${_pthLog}/aptfast.sh.ctrl.f98.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/aptfast.old" ]; then
          mv -f ${_optBin}/aptfast.old ${_optBin}/aptfast
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/backboa.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc duplicity)
    if (( _CNT > 0 )); then
      echo "The duplicity backup is running!"
    else
      if [ -e "${_optBin}/backboa" ]; then
        mv -f ${_optBin}/backboa ${_optBin}/backboa.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/backboa" -o ${_optBin}/backboa
      if [ -e "${_optBin}/backboa" ]; then
        chmod 700 ${_optBin}/backboa
        chown root:root ${_optBin}/backboa
        touch ${_pthLog}/backboa.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/backboa.old" ]; then
          mv -f ${_optBin}/backboa.old ${_optBin}/backboa
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/duobackboa.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc duplicity)
    if (( _CNT > 0 )); then
      echo "The duplicity backup is running!"
    else
      if [ -e "${_optBin}/duobackboa" ]; then
        mv -f ${_optBin}/duobackboa ${_optBin}/duobackboa.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/duobackboa" -o ${_optBin}/duobackboa
      if [ -e "${_optBin}/duobackboa" ]; then
        chmod 700 ${_optBin}/duobackboa
        chown root:root ${_optBin}/duobackboa
        touch ${_pthLog}/duobackboa.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/duobackboa.old" ]; then
          mv -f ${_optBin}/duobackboa.old ${_optBin}/duobackboa
        fi
      fi
    fi
  fi

  if [ -e "/root/.remote_backups/schedule/backup_schedule.txt" ]; then
    _BROKEN_UPDATE_TEST=$(grep "Under Construction" /root/.remote_backups/run/*.sh 2>&1)
    if [ ! -z "${_BROKEN_UPDATE_TEST}" ]; then
      rm -f ${_pthCtrl}/*.pid
    fi
    _BROKEN_UPDATE_TEST=$(grep "404 Not Found" /root/.remote_backups/run/*.sh 2>&1)
    if [ ! -z "${_BROKEN_UPDATE_TEST}" ]; then
      rm -f ${_pthCtrl}/*.pid
    fi
  fi

  if [ -e "/root/.remote_backups/schedule/backup_schedule.txt" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/dcysetup.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc duplicity)
    if (( _CNT > 0 )); then
      echo "The duplicity backup is running!"
    else
      if [ -e "${_optBin}/dcysetup" ]; then
        mv -f ${_optBin}/dcysetup ${_optBin}/dcysetup.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/dcysetup" -o ${_optBin}/dcysetup
      if [ -e "${_optBin}/dcysetup" ]; then
        chmod 700 ${_optBin}/dcysetup
        chown root:root ${_optBin}/dcysetup
        touch ${_pthCtrl}/dcysetup.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/dcysetup.old" ]; then
          mv -f ${_optBin}/dcysetup.old ${_optBin}/dcysetup
        fi
      fi
    fi
  fi

  if [ -e "/root/.remote_backups/schedule/backup_schedule.txt" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/multiback.sh.ctrl.f37.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc duplicity)
    if (( _CNT > 0 )); then
      echo "The duplicity backup is running!"
    else
      if [ -e "${_optBin}/multiback" ]; then
        mv -f ${_optBin}/multiback ${_optBin}/multiback.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/multiback" -o ${_optBin}/multiback
      if [ -e "${_optBin}/multiback" ]; then
        chmod 700 ${_optBin}/multiback
        chown root:root ${_optBin}/multiback
        touch ${_pthCtrl}/multiback.sh.ctrl.f37.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/multiback.old" ]; then
          mv -f ${_optBin}/multiback.old ${_optBin}/multiback
        fi
      fi
    fi
  fi

  if [ -e "/root/.remote_backups/schedule/backup_schedule.txt" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/mybackup.sh.ctrl.f37.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc duplicity)
    if (( _CNT > 0 )); then
      echo "The duplicity backup is running!"
    else
      if [ -e "${_optBin}/mybackup" ]; then
        mv -f ${_optBin}/mybackup ${_optBin}/mybackup.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/mybackup" -o ${_optBin}/mybackup
      if [ -e "${_optBin}/mybackup" ]; then
        chmod 755 ${_optBin}/mybackup
        chown root:root ${_optBin}/mybackup
        touch ${_pthCtrl}/mybackup.sh.ctrl.f37.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/mybackup.old" ]; then
          mv -f ${_optBin}/mybackup.old ${_optBin}/mybackup
        fi
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/install_dependencies.sh.ctrl.f48.${_tRee}.${_xSrl}.pid" ]; then
    if [ -e "/root/.remote_backups/run/install_dependencies.sh" ]; then
      mv -f /root/.remote_backups/run/install_dependencies.sh /root/.remote_backups/run/install_dependencies.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/install_dependencies.sh" -o /root/.remote_backups/run/install_dependencies.sh
    if [ -e "/root/.remote_backups/run/install_dependencies.sh" ]; then
      chmod 700 /root/.remote_backups/run/install_dependencies.sh
      chown root:root /root/.remote_backups/run/install_dependencies.sh
      touch ${_pthCtrl}/install_dependencies.sh.ctrl.f48.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/install_dependencies.sh.old" ]; then
        mv -f /root/.remote_backups/run/install_dependencies.sh.old /root/.remote_backups/run/install_dependencies.sh
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/create_credentials_templates.sh.ctrl.f48.${_tRee}.${_xSrl}.pid" ]; then
    rm -f /.backboa*
    if [ -e "/root/.remote_backups/run/create_credentials_templates.sh" ]; then
      mv -f /root/.remote_backups/run/create_credentials_templates.sh /root/.remote_backups/run/create_credentials_templates.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/create_credentials_templates.sh" -o /root/.remote_backups/run/create_credentials_templates.sh
    if [ -e "/root/.remote_backups/run/create_credentials_templates.sh" ]; then
      chmod 700 /root/.remote_backups/run/create_credentials_templates.sh
      chown root:root /root/.remote_backups/run/create_credentials_templates.sh
      touch ${_pthCtrl}/create_credentials_templates.sh.ctrl.f48.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/create_credentials_templates.sh.old" ]; then
        mv -f /root/.remote_backups/run/create_credentials_templates.sh.old /root/.remote_backups/run/create_credentials_templates.sh
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/create_global_paths_config.sh.ctrl.f44.${_tRee}.${_xSrl}.pid" ]; then
    if [ -e "/root/.remote_backups/run/create_global_paths_config.sh" ]; then
      mv -f /root/.remote_backups/run/create_global_paths_config.sh /root/.remote_backups/run/create_global_paths_config.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/create_global_paths_config.sh" -o /root/.remote_backups/run/create_global_paths_config.sh
    if [ -e "/root/.remote_backups/run/create_global_paths_config.sh" ]; then
      chmod 700 /root/.remote_backups/run/create_global_paths_config.sh
      chown root:root /root/.remote_backups/run/create_global_paths_config.sh
      touch ${_pthCtrl}/create_global_paths_config.sh.ctrl.f44.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/create_global_paths_config.sh.old" ]; then
        mv -f /root/.remote_backups/run/create_global_paths_config.sh.old /root/.remote_backups/run/create_global_paths_config.sh
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/create_user_paths_config.sh.ctrl.f48.${_tRee}.${_xSrl}.pid" ]; then
    rm -f /.backboa*
    if [ -e "/root/.remote_backups/run/create_user_paths_config.sh" ]; then
      mv -f /root/.remote_backups/run/create_user_paths_config.sh /root/.remote_backups/run/create_user_paths_config.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/create_user_paths_config.sh" -o /root/.remote_backups/run/create_user_paths_config.sh
    if [ -e "/root/.remote_backups/run/create_user_paths_config.sh" ]; then
      chmod 700 /root/.remote_backups/run/create_user_paths_config.sh
      chown root:root /root/.remote_backups/run/create_user_paths_config.sh
      touch ${_pthCtrl}/create_user_paths_config.sh.ctrl.f48.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/create_user_paths_config.sh.old" ]; then
        mv -f /root/.remote_backups/run/create_user_paths_config.sh.old /root/.remote_backups/run/create_user_paths_config.sh
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/create_cron_entries.sh.ctrl.f48.${_tRee}.${_xSrl}.pid" ]; then
    if [ -e "/root/.remote_backups/run/create_cron_entries.sh" ]; then
      mv -f /root/.remote_backups/run/create_cron_entries.sh /root/.remote_backups/run/create_cron_entries.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/create_cron_entries.sh" -o /root/.remote_backups/run/create_cron_entries.sh
    if [ -e "/root/.remote_backups/run/create_cron_entries.sh" ]; then
      chmod 700 /root/.remote_backups/run/create_cron_entries.sh
      chown root:root /root/.remote_backups/run/create_cron_entries.sh
      touch ${_pthCtrl}/create_cron_entries.sh.ctrl.f48.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/create_cron_entries.sh.old" ]; then
        mv -f /root/.remote_backups/run/create_cron_entries.sh.old /root/.remote_backups/run/create_cron_entries.sh
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/create_readme.sh.ctrl.f48.${_tRee}.${_xSrl}.pid" ]; then
    if [ -e "/root/.remote_backups/run/create_readme.sh" ]; then
      mv -f /root/.remote_backups/run/create_readme.sh /root/.remote_backups/run/create_readme.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/create_readme.sh" -o /root/.remote_backups/run/create_readme.sh
    if [ -e "/root/.remote_backups/run/create_readme.sh" ]; then
      chmod 700 /root/.remote_backups/run/create_readme.sh
      chown root:root /root/.remote_backups/run/create_readme.sh
      touch ${_pthCtrl}/create_readme.sh.ctrl.f48.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/create_readme.sh.old" ]; then
        mv -f /root/.remote_backups/run/create_readme.sh.old /root/.remote_backups/run/create_readme.sh
      fi
    fi
  fi

  if [ -d "/root/.remote_backups/run" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthCtrl}/create_config_readme.sh.ctrl.f48.${_tRee}.${_xSrl}.pid" ]; then
    if [ -e "/root/.remote_backups/run/create_config_readme.sh" ]; then
      mv -f /root/.remote_backups/run/create_config_readme.sh /root/.remote_backups/run/create_config_readme.sh.old
    fi
    curl ${_crlGet} "${_urlHmr}/tools/backup/run/create_config_readme.sh" -o /root/.remote_backups/run/create_config_readme.sh
    if [ -e "/root/.remote_backups/run/create_config_readme.sh" ]; then
      chmod 700 /root/.remote_backups/run/create_config_readme.sh
      chown root:root /root/.remote_backups/run/create_config_readme.sh
      touch ${_pthCtrl}/create_config_readme.sh.ctrl.f48.${_tRee}.${_xSrl}.pid
    else
      if [ -e "/root/.remote_backups/run/create_config_readme.sh.old" ]; then
        mv -f /root/.remote_backups/run/create_config_readme.sh.old /root/.remote_backups/run/create_config_readme.sh
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/scan_nginx.sh.ctrl.f81.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/scan_nginx.sh /var/xdrago/monitor/check/scan_nginx.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/scan_nginx.sh" -o /var/xdrago/monitor/check/scan_nginx.sh
    if [ -e "/var/xdrago/monitor/check/scan_nginx.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/scan_nginx.sh
      chown root:root /var/xdrago/monitor/check/scan_nginx.sh
      touch ${_pthLog}/scan_nginx.sh.ctrl.f81.${_tRee}.${_xSrl}.pid
      if [ ! -e "/var/xdrago/monitor/log/.scan_nginx_arch.${_xSrl}.pid" ]; then
        if [ -e "/var/xdrago/monitor/scan_nginx.archive.log" ]; then
          mv -f /var/xdrago/monitor/scan_nginx.archive.log /var/xdrago/monitor/log/.scan_nginx_legacy.archive.f81.${_tRee}.${_xSrl}.log
        fi
        if [ -e "/var/xdrago/monitor/log/scan_nginx.archive.log" ]; then
          mv -f /var/xdrago/monitor/log/scan_nginx.archive.log /var/xdrago/monitor/log/scan_nginx.archive.f81.${_tRee}.${_xSrl}.log
        fi
        rm -f /var/xdrago/monitor/log/.scan_nginx_arch*.pid
        touch /var/xdrago/monitor/log/.scan_nginx_arch.${_xSrl}.pid
        csf -df
        wait
        [ -e "/etc/csf/csfpost.d/synproxy.sh" ] && synproxy_reassert -p "443 80" --no-quic -q &> /dev/null
      fi
      if [ ! -e "/var/xdrago/monitor/log/.hackcheck.arch.${_xSrl}.pid" ]; then
        if [ -e "/var/xdrago/monitor/hackcheck.archive.log" ]; then
          mv -f /var/xdrago/monitor/hackcheck.archive.log /var/xdrago/monitor/log/.scan_nginx_legacy.archive.f81.${_tRee}.${_xSrl}.log
        fi
        if [ -e "/var/xdrago/monitor/log/hackcheck.archive.log" ]; then
          mv -f /var/xdrago/monitor/log/hackcheck.archive.log /var/xdrago/monitor/log/hackcheck.archive.f81.${_tRee}.${_xSrl}.log
        fi
        rm -f /var/xdrago/monitor/log/.hackcheck.arch*.pid
        touch /var/xdrago/monitor/log/.hackcheck.arch.${_xSrl}.pid
        csf -df
        wait
        [ -e "/etc/csf/csfpost.d/synproxy.sh" ] && synproxy_reassert -p "443 80" --no-quic -q &> /dev/null
      fi
    else
      mv -f /var/xdrago/monitor/check/scan_nginx.sh.old /var/xdrago/monitor/check/scan_nginx.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/java.sh.ctrl.f90.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/java.sh /var/xdrago/monitor/check/java.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/java.sh" -o /var/xdrago/monitor/check/java.sh
    if [ -e "/var/xdrago/monitor/check/java.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/java.sh
      chown root:root /var/xdrago/monitor/check/java.sh
      touch ${_pthLog}/java.sh.ctrl.f90.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/java.sh.old /var/xdrago/monitor/check/java.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/mysql.sh.ctrl.f82.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/mysql.sh /var/xdrago/monitor/check/mysql.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/mysql.sh" -o /var/xdrago/monitor/check/mysql.sh
    if [ -e "/var/xdrago/monitor/check/mysql.sh" ]; then
      if [ -e "/root/.debug.cnf" ] && [ ! -e "/root/.default.cnf" ]; then
        _DO_NOTHING=YES
      else
        if [ -e "/root/.high_load.cnf" ] \
          && [ ! -e "/root/.big_db.cnf" ] \
          && [ ! -e "/root/.tg.cnf" ]; then
          sed -i "s/3600/300/g" /var/xdrago/monitor/check/mysql.sh
        elif [ -e "/root/.big_db.cnf" ] || [ -e "/root/.tg.cnf" ]; then
          _DO_NOTHING=YES
        else
          sed -i "s/3600/1800/g" /var/xdrago/monitor/check/mysql.sh
        fi
      fi
      chmod 700 /var/xdrago/monitor/check/mysql.sh
      chown root:root /var/xdrago/monitor/check/mysql.sh
      touch ${_pthLog}/mysql.sh.ctrl.f82.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/mysql.sh.old /var/xdrago/monitor/check/mysql.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/nginx.sh.ctrl.f92.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/nginx.sh /var/xdrago/monitor/check/nginx.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/nginx.sh" -o /var/xdrago/monitor/check/nginx.sh
    if [ -e "/var/xdrago/monitor/check/nginx.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/nginx.sh
      chown root:root /var/xdrago/monitor/check/nginx.sh
      touch ${_pthLog}/nginx.sh.ctrl.f92.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/nginx.sh.old /var/xdrago/monitor/check/nginx.sh
    fi
  fi

  if [ ! -e "/var/xdrago/monitor/check/nginx_guard.sh" ]; then
    rm -f ${_pthLog}/nginx_guard.sh.ctrl.*
  fi
  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/nginx_guard.sh.ctrl.f98.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/nginx_guard.sh /var/xdrago/monitor/check/nginx_guard.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/nginx_guard.sh" -o /var/xdrago/monitor/check/nginx_guard.sh
    if [ -e "/var/xdrago/monitor/check/nginx_guard.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/nginx_guard.sh
      chown root:root /var/xdrago/monitor/check/nginx_guard.sh
      touch ${_pthLog}/nginx_guard.sh.ctrl.f98.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/nginx_guard.sh.old /var/xdrago/monitor/check/nginx_guard.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/php.sh.ctrl.f85.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/php.sh /var/xdrago/monitor/check/php.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/php.sh" -o /var/xdrago/monitor/check/php.sh
    if [ -e "/var/xdrago/monitor/check/php.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/php.sh
      chown root:root /var/xdrago/monitor/check/php.sh
      touch ${_pthLog}/php.sh.ctrl.f85.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/php.sh.old /var/xdrago/monitor/check/php.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/valkey.sh.ctrl.f87.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/valkey.sh /var/xdrago/monitor/check/valkey.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/valkey.sh" -o /var/xdrago/monitor/check/valkey.sh
    if [ -e "/var/xdrago/monitor/check/valkey.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/valkey.sh
      chown root:root /var/xdrago/monitor/check/valkey.sh
      touch ${_pthLog}/valkey.sh.ctrl.f87.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/valkey.sh.old /var/xdrago/monitor/check/valkey.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/redis.sh.ctrl.f90.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/redis.sh /var/xdrago/monitor/check/redis.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/redis.sh" -o /var/xdrago/monitor/check/redis.sh
    if [ -e "/var/xdrago/monitor/check/redis.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/redis.sh
      chown root:root /var/xdrago/monitor/check/redis.sh
      touch ${_pthLog}/redis.sh.ctrl.f90.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/redis.sh.old /var/xdrago/monitor/check/redis.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/system.sh.ctrl.f83.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/system.sh /var/xdrago/monitor/check/system.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/system.sh" -o /var/xdrago/monitor/check/system.sh
    if [ -e "/var/xdrago/monitor/check/system.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/system.sh
      chown root:root /var/xdrago/monitor/check/system.sh
      touch ${_pthLog}/system.sh.ctrl.f83.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/system.sh.old /var/xdrago/monitor/check/system.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/unbound.sh.ctrl.f86.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/unbound.sh /var/xdrago/monitor/check/unbound.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/unbound.sh" -o /var/xdrago/monitor/check/unbound.sh
    if [ -e "/var/xdrago/monitor/check/unbound.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/unbound.sh
      chown root:root /var/xdrago/monitor/check/unbound.sh
      touch ${_pthLog}/unbound.sh.ctrl.f86.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/unbound.sh.old /var/xdrago/monitor/check/unbound.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/escapecheck.sh.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/escapecheck.sh /var/xdrago/monitor/check/escapecheck.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/escapecheck.sh" -o /var/xdrago/monitor/check/escapecheck.sh
    if [ -e "/var/xdrago/monitor/check/escapecheck.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/escapecheck.sh
      chown root:root /var/xdrago/monitor/check/escapecheck.sh
      touch ${_pthLog}/escapecheck.sh.ctrl.f99.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/escapecheck.sh.old /var/xdrago/monitor/check/escapecheck.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/hackcheck.sh.ctrl.f95.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/hackcheck.sh /var/xdrago/monitor/check/hackcheck.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/hackcheck.sh" -o /var/xdrago/monitor/check/hackcheck.sh
    if [ -e "/var/xdrago/monitor/check/hackcheck.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/hackcheck.sh
      chown root:root /var/xdrago/monitor/check/hackcheck.sh
      touch ${_pthLog}/hackcheck.sh.ctrl.f95.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/hackcheck.sh.old /var/xdrago/monitor/check/hackcheck.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/hackftp.sh.ctrl.f98.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/hackftp.sh /var/xdrago/monitor/check/hackftp.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/hackftp.sh" -o /var/xdrago/monitor/check/hackftp.sh
    if [ -e "/var/xdrago/monitor/check/hackftp.sh" ]; then
      chmod 700 /var/xdrago/monitor/check/hackftp.sh
      chown root:root /var/xdrago/monitor/check/hackftp.sh
      touch ${_pthLog}/hackftp.sh.ctrl.f98.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/hackftp.sh.old /var/xdrago/monitor/check/hackftp.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/segfault_alert.pl.ctrl.f94.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/segfault_alert.pl /var/xdrago/monitor/check/segfault_alert.pl.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/segfault_alert.pl" -o /var/xdrago/monitor/check/segfault_alert.pl
    if [ -e "/var/xdrago/monitor/check/segfault_alert.pl" ]; then
      chmod 700 /var/xdrago/monitor/check/segfault_alert.pl
      chown root:root /var/xdrago/monitor/check/segfault_alert.pl
      touch ${_pthLog}/segfault_alert.pl.ctrl.f94.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/segfault_alert.pl.old /var/xdrago/monitor/check/segfault_alert.pl
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/sqlcheck.pl.ctrl.f94.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/monitor/check/sqlcheck.pl /var/xdrago/monitor/check/sqlcheck.pl.old
    curl ${_crlGet} "${_urlHmr}/tools/system/monitor/check/sqlcheck.pl" -o /var/xdrago/monitor/check/sqlcheck.pl
    if [ -e "/var/xdrago/monitor/check/sqlcheck.pl" ]; then
      chmod 700 /var/xdrago/monitor/check/sqlcheck.pl
      chown root:root /var/xdrago/monitor/check/sqlcheck.pl
      touch ${_pthLog}/sqlcheck.pl.ctrl.f94.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/monitor/check/sqlcheck.pl.old /var/xdrago/monitor/check/sqlcheck.pl
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ ! -e "${_pthLog}/cv-phar-symlink.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    if [ -x "/usr/local/bin/cv.phar" ] \
      && [ -L "/usr/bin/cv" ]; then
      _CV_SYMLINK=$(readlink -n /usr/bin/cv 2>&1)
      _CV_SYMLINK=$(echo -n ${_CV_SYMLINK} | tr -d "\n" 2>&1)
      if [ "${_CV_SYMLINK}" != "/usr/local/bin/cv.phar" ]; then
        rm -f /usr/bin/cv
        ln -sfn /usr/local/bin/cv.phar /usr/bin/cv
        touch ${_pthLog}/cv-phar-symlink.ctrl.${_tRee}.${_xSrl}.pid
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ ! -e "${_pthLog}/drush8-classic-symlink.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
      && [ -L "/usr/bin/drush8" ]; then
      _DRUSH_SYMLINK=$(readlink -n /usr/bin/drush8 2>&1)
      _DRUSH_SYMLINK=$(echo -n ${_DRUSH_SYMLINK} | tr -d "\n" 2>&1)
      if [ "${_DRUSH_SYMLINK}" != "/opt/tools/drush/8/drush/drush.php" ]; then
        rm -f /usr/bin/drush8
        rm -f /usr/bin/drush
        ln -sfn /opt/tools/drush/8/drush/drush.php /usr/bin/drush8
        ln -sfn /opt/tools/drush/8/drush/drush.php /usr/bin/drush
        touch ${_pthLog}/drush8-classic-symlink.ctrl.${_tRee}.${_xSrl}.pid
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/clean-boa-env.ctrl.f97.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /etc/init.d/clean-boa-env /var/xdrago/clean-boa-env.old
    curl ${_crlGet} "${_urlHmr}/conf/var/clean-boa-env" -o /etc/init.d/clean-boa-env
    if [ -e "/etc/init.d/clean-boa-env" ]; then
      chmod 700 /etc/init.d/clean-boa-env
      chown root:root /etc/init.d/clean-boa-env
      touch ${_pthLog}/clean-boa-env.ctrl.f97.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/clean-boa-env.old /etc/init.d/clean-boa-env
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/mysql_backup.sh.ctrl.f88.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc mysql_backup.sh)
    if (( _CNT > 0 )); then
      echo "The mysql_backup.sh is running!"
    else
      mv -f /var/xdrago/mysql_backup.sh /var/xdrago/mysql_backup.sh.old
      curl ${_crlGet} "${_urlHmr}/tools/system/mysql_backup.sh" -o /var/xdrago/mysql_backup.sh
      if [ -e "/var/xdrago/mysql_backup.sh" ]; then
        chmod 700 /var/xdrago/mysql_backup.sh
        chown root:root /var/xdrago/mysql_backup.sh
        touch ${_pthLog}/mysql_backup.sh.ctrl.f88.${_xSrl}.pid
      else
        mv -f /var/xdrago/mysql_backup.sh.old /var/xdrago/mysql_backup.sh
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/unbound-helper.ctrl.f95.${_xSrl}.pid" ]; then
    mv -f /usr/libexec/unbound-helper /usr/libexec/unbound-helper.old
    curl ${_crlGet} "${_urlHmr}/conf/dns/unbound-helper" -o /usr/libexec/unbound-helper
    if [ -e "/usr/libexec/unbound-helper" ]; then
      chmod 755 /usr/libexec/unbound-helper
      chown root:root /usr/libexec/unbound-helper
      touch ${_pthLog}/unbound-helper.ctrl.f95.${_xSrl}.pid
    else
      mv -f /usr/libexec/unbound-helper.old /usr/libexec/unbound-helper
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/mysql_cleanup.sh.ctrl.f92.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/mysql_cleanup.sh /var/xdrago/mysql_cleanup.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/mysql_cleanup.sh" -o /var/xdrago/mysql_cleanup.sh
    if [ -e "/var/xdrago/mysql_cleanup.sh" ]; then
      chmod 700 /var/xdrago/mysql_cleanup.sh
      chown root:root /var/xdrago/mysql_cleanup.sh
      touch ${_pthLog}/mysql_cleanup.sh.ctrl.f92.${_xSrl}.pid
    else
      mv -f /var/xdrago/mysql_cleanup.sh.old /var/xdrago/mysql_cleanup.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/mysql_cluster_backup.sh.ctrl.f91.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc mysql_cluster_backup.sh)
    if (( _CNT > 0 )); then
      echo "The mysql_cluster_backup.sh is running!"
    else
      mv -f /var/xdrago/mysql_cluster_backup.sh /var/xdrago/mysql_cluster_backup.sh.old
      curl ${_crlGet} "${_urlHmr}/tools/system/mysql_cluster_backup.sh" -o /var/xdrago/mysql_cluster_backup.sh
      if [ -e "/var/xdrago/mysql_cluster_backup.sh" ]; then
        chmod 700 /var/xdrago/mysql_cluster_backup.sh
        chown root:root /var/xdrago/mysql_cluster_backup.sh
        touch ${_pthLog}/mysql_cluster_backup.sh.ctrl.f91.${_tRee}.${_xSrl}.pid
      else
        mv -f /var/xdrago/mysql_cluster_backup.sh.old /var/xdrago/mysql_cluster_backup.sh
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/runner.sh.ctrl.f86.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/runner.sh /var/xdrago/runner.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/runner.sh" -o /var/xdrago/runner.sh
    if [ -e "/var/xdrago/runner.sh" ]; then
      chmod 700 /var/xdrago/runner.sh
      chown root:root /var/xdrago/runner.sh
      touch ${_pthLog}/runner.sh.ctrl.f86.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/runner.sh.old /var/xdrago/runner.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/minute.sh.ctrl.f91.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/minute.sh /var/xdrago/minute.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/minute.sh" -o /var/xdrago/minute.sh
    if [ -e "/var/xdrago/minute.sh" ]; then
      chmod 700 /var/xdrago/minute.sh
      chown root:root /var/xdrago/minute.sh
      touch ${_pthLog}/minute.sh.ctrl.f91.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/minute.sh.old /var/xdrago/minute.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/second.sh.ctrl.f88.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/second.sh /var/xdrago/second.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/second.sh" -o /var/xdrago/second.sh
    if [ -e "/var/xdrago/second.sh" ]; then
      chmod 700 /var/xdrago/second.sh
      chown root:root /var/xdrago/second.sh
      touch ${_pthLog}/second.sh.ctrl.f88.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/second.sh.old /var/xdrago/second.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/ip_access.sh.ctrl.f93.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/ip_access.sh /var/xdrago/ip_access.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/ip_access.sh" -o /var/xdrago/ip_access.sh
    if [ -e "/var/xdrago/ip_access.sh" ]; then
      chmod 700 /var/xdrago/ip_access.sh
      chown root:root /var/xdrago/ip_access.sh
      touch ${_pthLog}/ip_access.sh.ctrl.f93.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/ip_access.sh.old /var/xdrago/ip_access.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/move_sql.sh.ctrl.f90.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/move_sql.sh /var/xdrago/move_sql.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/move_sql.sh" -o /var/xdrago/move_sql.sh
    if [ -e "/var/xdrago/move_sql.sh" ]; then
      chmod 700 /var/xdrago/move_sql.sh
      chown root:root /var/xdrago/move_sql.sh
      touch ${_pthLog}/move_sql.sh.ctrl.f90.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/move_sql.sh.old /var/xdrago/move_sql.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/mysql_repair.sh.ctrl.f95.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/mysql_repair.sh /var/xdrago/mysql_repair.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/mysql_repair.sh" -o /var/xdrago/mysql_repair.sh
    if [ -e "/var/xdrago/mysql_repair.sh" ]; then
      chmod 700 /var/xdrago/mysql_repair.sh
      chown root:root /var/xdrago/mysql_repair.sh
      touch ${_pthLog}/mysql_repair.sh.ctrl.f95.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/mysql_repair.sh.old /var/xdrago/mysql_repair.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/purge_binlogs.sh.ctrl.f93.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/purge_binlogs.sh /var/xdrago/purge_binlogs.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/purge_binlogs.sh" -o /var/xdrago/purge_binlogs.sh
    if [ -e "/var/xdrago/purge_binlogs.sh" ]; then
      chmod 700 /var/xdrago/purge_binlogs.sh
      chown root:root /var/xdrago/purge_binlogs.sh
      touch ${_pthLog}/purge_binlogs.sh.ctrl.f93.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/purge_binlogs.sh.old /var/xdrago/purge_binlogs.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/checksql.pl.ctrl.f95.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/checksql.pl /var/xdrago/checksql.pl.old
    curl ${_crlGet} "${_urlHmr}/tools/system/checksql.pl" -o /var/xdrago/checksql.pl
    if [ -e "/var/xdrago/checksql.pl" ]; then
      chmod 700 /var/xdrago/checksql.pl
      chown root:root /var/xdrago/checksql.pl
      touch ${_pthLog}/checksql.pl.ctrl.f95.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/checksql.pl.old /var/xdrago/checksql.pl
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/clear.sh.ctrl.f85.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/clear.sh /var/xdrago/clear.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/clear.sh" -o /var/xdrago/clear.sh
    if [ -e "/var/xdrago/clear.sh" ]; then
      chmod 700 /var/xdrago/clear.sh
      chown root:root /var/xdrago/clear.sh
      touch ${_pthLog}/clear.sh.ctrl.f85.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/clear.sh.old /var/xdrago/clear.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/autoupboa.ctrl.f76.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc autoupboa)
    if (( _CNT > 0 )); then
      echo "The autoupboa is running!"
    else
      if [ -e "${_optBin}/autoupboa" ]; then
        mv -f ${_optBin}/autoupboa ${_optBin}/autoupboa.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/autoupboa" -o ${_optBin}/autoupboa
      if [ -e "${_optBin}/autoupboa" ]; then
        chmod 700 ${_optBin}/autoupboa
        chown root:root ${_optBin}/autoupboa
        touch ${_pthLog}/autoupboa.ctrl.f76.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/autoupboa.old" ]; then
          mv -f ${_optBin}/autoupboa.old ${_optBin}/autoupboa
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/fixmounts.ctrl.f98.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc fixmounts)
    if (( _CNT > 0 )); then
      echo "The fixmounts is running!"
    else
      if [ -e "${_optBin}/fixmounts" ]; then
        mv -f ${_optBin}/fixmounts ${_optBin}/fixmounts.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/fixmounts" -o ${_optBin}/fixmounts
      if [ -e "${_optBin}/fixmounts" ]; then
        chmod 700 ${_optBin}/fixmounts
        chown root:root ${_optBin}/fixmounts
        touch ${_pthLog}/fixmounts.ctrl.f98.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/fixmounts.old" ]; then
          mv -f ${_optBin}/fixmounts.old ${_optBin}/fixmounts
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/daily.sh.ctrl.f73.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/daily.sh /var/xdrago/daily.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/daily.sh" -o /var/xdrago/daily.sh
    if [ -e "/var/xdrago/daily.sh" ]; then
      chmod 700 /var/xdrago/daily.sh
      chown root:root /var/xdrago/daily.sh
      touch ${_pthLog}/daily.sh.ctrl.f73.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/daily.sh.old /var/xdrago/daily.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/graceful.sh.ctrl.f86.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/graceful.sh /var/xdrago/graceful.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/graceful.sh" -o /var/xdrago/graceful.sh
    if [ -e "/var/xdrago/graceful.sh" ]; then
      chmod 700 /var/xdrago/graceful.sh
      chown root:root /var/xdrago/graceful.sh
      touch ${_pthLog}/graceful.sh.ctrl.f86.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/graceful.sh.old /var/xdrago/graceful.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/usage.sh.ctrl.f80.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/usage.sh /var/xdrago/usage.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/usage.sh" -o /var/xdrago/usage.sh
    if [ -e "/var/xdrago/usage.sh" ]; then
      chmod 700 /var/xdrago/usage.sh
      chown root:root /var/xdrago/usage.sh
      touch ${_pthLog}/usage.sh.ctrl.f80.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/usage.sh.old /var/xdrago/usage.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/manage_ltd_users.sh.ctrl.f67.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/manage_ltd_users.sh /var/xdrago/manage_ltd_users.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/manage_ltd_users.sh" \
      -o /var/xdrago/manage_ltd_users.sh
    if [ -e "/var/xdrago/manage_ltd_users.sh" ]; then
      chmod 700 /var/xdrago/manage_ltd_users.sh
      chown root:root /var/xdrago/manage_ltd_users.sh
      touch ${_pthLog}/manage_ltd_users.sh.ctrl.f67.${_tRee}.${_xSrl}.pid
      [ -e "/run/manage_ltd_users.pid" ] && rm -f /run/manage_ltd_users.pid
      [ -d "/var/backups/ltd/log" ] && rm -rf /var/backups/ltd/log
      mkdir -p /var/backups/ltd/{conf,log,old}
    else
      mv -f /var/xdrago/manage_ltd_users.sh.old /var/xdrago/manage_ltd_users.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/manage_solr_config.sh.ctrl.f85.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/manage_solr_config.sh /var/xdrago/manage_solr_config.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/manage_solr_config.sh" \
      -o /var/xdrago/manage_solr_config.sh
    if [ -e "/var/xdrago/manage_solr_config.sh" ]; then
      chmod 700 /var/xdrago/manage_solr_config.sh
      chown root:root /var/xdrago/manage_solr_config.sh
      touch ${_pthLog}/manage_solr_config.sh.ctrl.f85.${_tRee}.${_xSrl}.pid
      rm -f /run/manage_solr_config.pid
    else
      mv -f /var/xdrago/manage_solr_config.sh.old /var/xdrago/manage_solr_config.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/proc_num_ctrl.pl.ctrl.f83.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/proc_num_ctrl.pl /var/xdrago/proc_num_ctrl.pl.old
    curl ${_crlGet} "${_urlHmr}/tools/system/proc_num_ctrl.pl" \
      -o /var/xdrago/proc_num_ctrl.pl
    if [ -e "/var/xdrago/proc_num_ctrl.pl" ]; then
      chmod 700 /var/xdrago/proc_num_ctrl.pl
      chown root:root /var/xdrago/proc_num_ctrl.pl
      touch ${_pthLog}/proc_num_ctrl.pl.ctrl.f83.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/proc_num_ctrl.pl.old /var/xdrago/proc_num_ctrl.pl
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/fast_shutdown.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    sed -i "s/.*opcache.fast_shutdown.*//g" /opt/etc/fpm/fpm-pool-commo*.conf
    _PHP_V="85 84 83 82 81 80 74 73 72 71 70 56"
    for e in ${_PHP_V}; do
      if [ -e "/etc/init.d/php${e}-fpm" ] && [ -e "/opt/php${e}/bin/php" ]; then
        service "php${e}-fpm" reload &> /dev/null
      fi
    done
    _PHP_V="55 54 53"
    for e in ${_PHP_V}; do
      if [ -e "/etc/init.d/php${e}-fpm" ] && [ -e "/opt/php${e}/bin/php" ]; then
        service "php${e}-fpm" force-quit &> /dev/null
      fi
    done
    touch ${_pthLog}/fast_shutdown.ctrl.${_tRee}.${_xSrl}.pid
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -x "/usr/sbin/csf" ] \
    && [ -e "/etc/csf/csf.deny" ] \
    && [ ! -e "${_pthLog}/guest-fire.sh.ctrl.f92.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/guest-fire.sh /var/xdrago/guest-fire.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/guest-fire.sh" \
      -o /var/xdrago/guest-fire.sh
    if [ -e "/var/xdrago/guest-fire.sh" ]; then
      chmod 700 /var/xdrago/guest-fire.sh
      chown root:root /var/xdrago/guest-fire.sh
      touch ${_pthLog}/guest-fire.sh.ctrl.f92.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/guest-fire.sh.old /var/xdrago/guest-fire.sh
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -x "/usr/sbin/csf" ] \
    && [ -e "/etc/csf/csf.deny" ] \
    && [ ! -e "${_pthLog}/guest-water.sh.ctrl.f89.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/guest-water.sh /var/xdrago/guest-water.sh.old
    curl ${_crlGet} "${_urlHmr}/tools/system/guest-water.sh" \
      -o /var/xdrago/guest-water.sh
    if [ -e "/var/xdrago/guest-water.sh" ]; then
      chmod 700 /var/xdrago/guest-water.sh
      chown root:root /var/xdrago/guest-water.sh
      touch ${_pthLog}/guest-water.sh.ctrl.f89.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/guest-water.sh.old /var/xdrago/guest-water.sh
    fi
  fi

  if ! grep -q "whoami" /var/xdrago/conf/lshell.conf; then
    rm -f ${_pthLog}/lshell.ctrl.*
  fi
  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/lshell.ctrl.f91.${_tRee}.${_xSrl}.pid" ]; then
    if [ -z "${_CUSTOM_CONFIG_LSHELL}" ] \
      || [ "${_CUSTOM_CONFIG_LSHELL}" = "NO" ]; then
      mv -f /var/xdrago/conf/lshell.conf /var/xdrago/conf/lshell.conf.old
      curl ${_crlGet} "${_urlHmr}/tools/system/conf/lshell.conf" \
        -o /var/xdrago/conf/lshell.conf
      if [ -e "/var/xdrago/conf/lshell.conf" ]; then
        chmod 644 /var/xdrago/conf/lshell.conf
        chown root:root /var/xdrago/conf/lshell.conf
        touch ${_pthLog}/lshell.ctrl.f91.${_tRee}.${_xSrl}.pid
      else
        mv -f /var/xdrago/conf/lshell.conf.old /var/xdrago/conf/lshell.conf
      fi
    fi
  fi

  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
    _BROKEN_UPDATE_TEST=$(grep "Under Construction" /var/xdrago/conf/fpm-pool* 2>&1)
    if [ ! -z "${_BROKEN_UPDATE_TEST}" ]; then
      rm -f /var/xdrago/conf/fpm-pool*
      rm ${_pthLog}/multi.ctrl.*
      rm ${_pthLog}/legacy.ctrl.*
      rm ${_pthLog}/modern.ctrl.*
      rm ${_pthLog}/single.ctrl.*
      rm ${_pthLog}/common.ctrl.*
    fi
    _BROKEN_UPDATE_TEST=$(grep "404 Not Found" /var/xdrago/conf/fpm-pool* 2>&1)
    if [ ! -z "${_BROKEN_UPDATE_TEST}" ]; then
      rm -f /var/xdrago/conf/fpm-pool*
      rm ${_pthLog}/multi.ctrl.*
      rm ${_pthLog}/legacy.ctrl.*
      rm ${_pthLog}/modern.ctrl.*
      rm ${_pthLog}/single.ctrl.*
      rm ${_pthLog}/common.ctrl.*
    fi
    _BROKEN_UPDATE_TEST=$(grep "max_execution_time" /var/xdrago/conf/fpm-pool* 2>&1)
    if [ -z "${_BROKEN_UPDATE_TEST}" ]; then
      rm -f /var/xdrago/conf/fpm-pool*
      rm ${_pthLog}/multi.ctrl.*
      rm ${_pthLog}/legacy.ctrl.*
      rm ${_pthLog}/modern.ctrl.*
      rm ${_pthLog}/single.ctrl.*
      rm ${_pthLog}/common.ctrl.*
    fi
    _BROKEN_UPDATE_TEST=$(grep "max_accelerated_files" /var/xdrago/conf/fpm-pool* 2>&1)
    if [ ! -z "${_BROKEN_UPDATE_TEST}" ]; then
      rm -f /var/xdrago/conf/fpm-pool*
      rm ${_pthLog}/multi.ctrl.*
      rm ${_pthLog}/legacy.ctrl.*
      rm ${_pthLog}/modern.ctrl.*
      rm ${_pthLog}/single.ctrl.*
      rm ${_pthLog}/common.ctrl.*
    fi
  fi

  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/common.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/conf/fpm-pool-common.conf /var/xdrago/conf/fpm-pool-common.conf.old
    curl ${_crlGet} "${_urlHmr}/conf/php/fpm-pool-common.conf" \
      -o /var/xdrago/conf/fpm-pool-common.conf
    if [ -e "/var/xdrago/conf/fpm-pool-common.conf" ]; then
      sed -i "s/127.0.0.1/127.0.0.1,${_LOC_IP}/g" /var/xdrago/conf/fpm-pool-common.conf
      chmod 644 /var/xdrago/conf/fpm-pool-common.conf
      chown root:root /var/xdrago/conf/fpm-pool-common.conf
      touch ${_pthLog}/common.ctrl.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/conf/fpm-pool-common.conf.old /var/xdrago/conf/fpm-pool-common.conf
    fi
  fi

  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/legacy.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/conf/fpm-pool-common-legacy.conf /var/xdrago/conf/fpm-pool-common-legacy.conf.old
    curl ${_crlGet} "${_urlHmr}/conf/php/fpm-pool-common-legacy.conf" \
      -o /var/xdrago/conf/fpm-pool-common-legacy.conf
    if [ -e "/var/xdrago/conf/fpm-pool-common-legacy.conf" ]; then
      sed -i "s/127.0.0.1/127.0.0.1,${_LOC_IP}/g" /var/xdrago/conf/fpm-pool-common-legacy.conf
      chmod 644 /var/xdrago/conf/fpm-pool-common-legacy.conf
      chown root:root /var/xdrago/conf/fpm-pool-common-legacy.conf
      touch ${_pthLog}/legacy.ctrl.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/conf/fpm-pool-common-legacy.conf.old /var/xdrago/conf/fpm-pool-common-legacy.conf
    fi
  fi

  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/modern.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/conf/fpm-pool-common-modern.conf /var/xdrago/conf/fpm-pool-common-modern.conf.old
    curl ${_crlGet} "${_urlHmr}/conf/php/fpm-pool-common-modern.conf" \
      -o /var/xdrago/conf/fpm-pool-common-modern.conf
    if [ -e "/var/xdrago/conf/fpm-pool-common-modern.conf" ]; then
      sed -i "s/127.0.0.1/127.0.0.1,${_LOC_IP}/g" /var/xdrago/conf/fpm-pool-common-modern.conf
      chmod 644 /var/xdrago/conf/fpm-pool-common-modern.conf
      chown root:root /var/xdrago/conf/fpm-pool-common-modern.conf
      touch ${_pthLog}/modern.ctrl.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/conf/fpm-pool-common-modern.conf.old /var/xdrago/conf/fpm-pool-common-modern.conf
    fi
  fi

  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/multi.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/conf/fpm-pool-foo-multi.conf /var/xdrago/conf/fpm-pool-foo-multi.conf.old
    curl ${_crlGet} "${_urlHmr}/conf/php/fpm-pool-foo-multi.conf" \
      -o /var/xdrago/conf/fpm-pool-foo-multi.conf
    if [ -e "/var/xdrago/conf/fpm-pool-foo-multi.conf" ]; then
      chmod 644 /var/xdrago/conf/fpm-pool-foo-multi.conf
      chown root:root /var/xdrago/conf/fpm-pool-foo-multi.conf
      touch ${_pthLog}/multi.ctrl.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/conf/fpm-pool-foo-multi.conf.old /var/xdrago/conf/fpm-pool-foo-multi.conf
    fi
  fi

  if [ -e "/opt/tools/drush" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/single.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/conf/fpm-pool-foo.conf /var/xdrago/conf/fpm-pool-foo.conf.old
    curl ${_crlGet} "${_urlHmr}/conf/php/fpm-pool-foo.conf" \
      -o /var/xdrago/conf/fpm-pool-foo.conf
    if [ -e "/var/xdrago/conf/fpm-pool-foo.conf" ]; then
      chmod 644 /var/xdrago/conf/fpm-pool-foo.conf
      chown root:root /var/xdrago/conf/fpm-pool-foo.conf
      touch ${_pthLog}/single.ctrl.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/conf/fpm-pool-foo.conf.old /var/xdrago/conf/fpm-pool-foo.conf
    fi
  fi

  if [ -e "/etc/ImageMagick-6/policy.xml" ] \
    && [ -e "/var/xdrago" ] \
    && [ ! -e "${_pthLog}/policymap-hf-06.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    _isCurlBin="$(which curl)"
    chmod 755 ${_isCurlBin} &> /dev/null
    chgrp root ${_isCurlBin} &> /dev/null
    cp -af /etc/ImageMagick-6/policy.xml /var/xdrago/conf/etc-ImageMagick-6-policy.xml.hf-06.old
    rm -f /var/xdrago/conf/etc-ImageMagick-6-policy.xml
    curl ${_crlGet} "${_urlHmr}/conf/etc/etc-ImageMagick-6-policy.xml" \
      -o /var/xdrago/conf/etc-ImageMagick-6-policy.xml
    if [ -e "/var/xdrago/conf/etc-ImageMagick-6-policy.xml" ]; then
      cp -af /var/xdrago/conf/etc-ImageMagick-6-policy.xml /etc/ImageMagick-6/policy.xml
      chmod 644 /etc/ImageMagick-6/policy.xml
      chown root:root /etc/ImageMagick-6/policy.xml
      touch ${_pthLog}/policymap-hf-06.ctrl.${_tRee}.${_xSrl}.pid
      _PHP_V="85 84 83 82 81 80 74 73 72 71 70 56"
      for e in ${_PHP_V}; do
        if [ -e "/etc/init.d/php${e}-fpm" ]; then
          service "php${e}-fpm" reload &> /dev/null
        fi
      done
    else
      if [ -e "/var/xdrago/conf/etc-ImageMagick-6-policy.xml.hf-06.old" ]; then
        cp -af /var/xdrago/conf/etc-ImageMagick-6-policy.xml.hf-06.old /etc/ImageMagick-6/policy.xml
      fi
    fi
  fi

  if [ -e "/opt/tools/drush" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -d "/data/u" ] \
    && [ ! -e "${_pthLog}/dispatch.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    sed -i "s/.*cache.*//g; s/.*cc drush.*//g; s/ *$//g; /^$/d" /data/disk/*/aegir.sh
    touch ${_pthLog}/dispatch.ctrl.${_tRee}.${_xSrl}.pid
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/xdrago/conf/control-readme.txt" ] \
    && [ ! -e "${_pthLog}/control-readme.txt.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /var/xdrago/conf/control-readme.txt /var/xdrago/conf/control-readme.txt.old
    curl ${_crlGet} "${_urlHmr}/tools/system/conf/control-readme.txt" -o /var/xdrago/conf/control-readme.txt
    if [ -e "/var/xdrago/conf/control-readme.txt" ]; then
      chmod 644 /var/xdrago/conf/control-readme.txt
      chown root:root /var/xdrago/conf/control-readme.txt
      touch ${_pthLog}/control-readme.txt.ctrl.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/conf/control-readme.txt.old /var/xdrago/conf/control-readme.txt
    fi
  fi

  if [ -d "/data/u" ] \
    && [ ! -e "${_pthLog}/hosting.cron.queue.ctrl.f96.${_tRee}.${_xSrl}.pid" ]; then
    _hQueueF="hosting_cron.module"
    _hQueueP="/var/xdrago/conf/${_hQueueF}"
    [ -e "${_hQueueP}" ] && _isPatchedTpl=$(grep "url_own" "${_hQueueP}")
    if [ ! -e "${_hQueueP}" ] || [[ ! "${_isPatchedTpl}" =~ "url_own" ]]; then
      curl ${_crlGet} "${_urlHmr}/patches/${_hQueueF}" -o ${_hQueueP}
    fi
    for _pthSysUsr in `find /data/disk/ -maxdepth 1 -mindepth 1 | sort`; do
      _tUsr=
      _tUsr=$(echo ${_pthSysUsr} | cut -d'/' -f4 | awk '{ print $1}' 2>&1)
      if [ -n "${_tUsr}" ] && [ "${_tUsr}" != "arch" ]; then
        if [ -e "${_pthSysUsr}/log/hosting_cron_use_backend.txt" ]; then
          rm -f ${_pthSysUsr}/log/hosting_cron_use_backend.txt
        fi
        _hmPlr=$(cat ${_pthSysUsr}/.drush/hostmaster.alias.drushrc.php \
          | grep "root'" \
          | cut -d: -f2 \
          | awk '{ print $3}' \
          | sed "s/[\,']//g" 2>&1)
        _hmDir="${_hmPlr}/profiles/hostmaster/modules/aegir/hosting"
        _hmQmd="${_hmDir}/cron/hosting_cron.module"
        if [ -e "${_hmDir}/cron/hosting_cron.module.orig" ]; then
          rm -f ${_hmDir}/cron/hosting_cron.module.orig
        fi
        if [ -e "${_hmDir}/cron/hosting_cron.module.rej" ]; then
          rm -f ${_hmDir}/cron/hosting_cron.module.rej
        fi
        if [ -e "${_hmQmd}" ] && [ -e "${_hQueueP}" ]; then
          _isPatched=$(grep "url_own" "${_hmQmd}")
          if [[ ! "${_isPatched}" =~ "url_own" ]]; then
            cp -a ${_hQueueP} ${_hmDir}/cron/
            if [ -e "${_hmDir}/cron/${_hQueueF}" ]; then
              sed -i "s/127.0.0.1/${_LOC_IP}/g" "${_hmDir}/cron/${_hQueueF}"
            fi
          fi
        fi
      fi
    done
    touch ${_pthLog}/hosting.cron.queue.ctrl.f96.${_tRee}.${_xSrl}.pid
  fi

  if [ -d "/data/u" ] \
    && [ ! -e "${_pthLog}/hosting.cron.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    for _pthSysUsr in `find /data/disk/ -maxdepth 1 -mindepth 1 | sort`; do
      _tUsr=
      _tUsr=$(echo ${_pthSysUsr} | cut -d'/' -f4 | awk '{ print $1}' 2>&1)
      if [ -n "${_tUsr}" ] && [ "${_tUsr}" != "arch" ]; then
        if [ -e "${_pthSysUsr}/log/hosting_cron_use_backend.txt" ]; then
          rm -f ${_pthSysUsr}/log/hosting_cron_use_backend.txt
        fi
      fi
    done
    touch ${_pthLog}/hosting.cron.ctrl.f99.${_tRee}.${_xSrl}.pid
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/data/u" ] \
    && [ -e "/usr/sbin/csf" ] \
    && [ ! -e "${_pthLog}/fpm-cli.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    _usrGroup=users
    [ -d "/var/backups/off-run/" ] && cp -a /var/backups/off-run/run* /var/xdrago/ &> /dev/null
    for _pthSysUsr in `find /data/disk/ -maxdepth 1 -mindepth 1 | sort`; do
      _tUsr=
      _tUsr=$(echo ${_pthSysUsr} | cut -d'/' -f4 | awk '{ print $1}' 2>&1)
      if [ "${_tUsr}" != "arch" ]; then
        if [ ! -e "${_pthSysUsr}/static/control/MyQuick.info" ] \
          && [ ! -e "${_pthSysUsr}/static/control/MyClassic.info" ]; then
          echo ON > ${_pthSysUsr}/static/control/MyQuick.info
        fi
        if [ ! -e "${_pthSysUsr}/static/control/.disFastTrack.pid" ]; then
          rm -f ${_pthSysUsr}/static/control/FastTrack.info
          touch ${_pthSysUsr}/static/control/.disFastTrack.pid
        fi
        if [ ! -e "${_pthSysUsr}/static/control/FastTrack.info" ] \
          && [ ! -e "${_pthSysUsr}/static/control/ClassicTrack.info" ]; then
          echo ON > ${_pthSysUsr}/static/control/ClassicTrack.info
        fi
        if [ -e "${_pthSysUsr}/static/control/fpm.info" ] \
          && [ ! -e "${_pthSysUsr}/static/control/cli.info" ]; then
          cp ${_pthSysUsr}/static/control/fpm.info ${_pthSysUsr}/static/control/cli.info
        fi
        if [ -e "${_pthSysUsr}/log/CANCELLED" ] \
          || [ -e "${_pthSysUsr}/log/proxied.pid" ] \
          || [ ! -e "${_pthSysUsr}/static/control/cli.info" ]; then
          if [ -e "/var/xdrago/run-${_tUsr}" ] \
            && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
            [ -d "/var/backups/off-run" ] || mkdir -p /var/backups/off-run
            mv -f /var/xdrago/run-${_tUsr} /var/backups/off-run/
          fi
        else
          _dscUsr="/data/disk/${_tUsr}"
          _ngxCnf="${_dscUsr}/config/includes/nginx_vhost_common.conf"
          _NGINX_CNF_TEST=$(grep "foobaroff" ${_ngxCnf} 2>&1)
          if [[ "${_NGINX_CNF_TEST}" =~ "foobaroff" ]]; then
            _DO_NOTHING=YES
          else
            sed -i "s/args.*q=/args ~* \"foobaroff=/g" ${_ngxCnf}
          fi
          for _version in 84 85 83 82 81 74 56; do
            if [ -x "/opt/php${_version}/bin/php" ]; then
              if [ "${_version}" = "74" ]; then
                _useCli="7.4"
                _useFpm="7.4"
              elif [ "${_version}" = "56" ]; then
                _useCli="5.6"
                _useFpm="5.6"
              else
                _useCli="8.${_version:1}"
                _useFpm="8.${_version:1}"
              fi
              break
            fi
          done
          if [ ! -e "${_dscUsr}/static/control/fpm.info" ] \
            && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
            if [ -n "${_useFpm}" ]; then
              echo ${_useFpm} > ${_dscUsr}/static/control/fpm.info
              chown ${_tUsr}.ftp:${_usrGroup} ${_dscUsr}/static/control/fpm.info
              chmod 0644 ${_dscUsr}/static/control/fpm.info
            fi
          fi
          if [ ! -e "${_dscUsr}/static/control/cli.info" ] \
            && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
            if [ -e "${_dscUsr}/static/control/fpm.info" ]; then
              cp -af ${_dscUsr}/static/control/fpm.info ${_dscUsr}/static/control/cli.info
            else
              if [ -n "${_useCli}" ]; then
                echo ${_useCli} > ${_dscUsr}/static/control/cli.info
                chown ${_tUsr}.ftp:${_usrGroup} ${_dscUsr}/static/control/cli.info
                chmod 0644 ${_dscUsr}/static/control/cli.info
              fi
            fi
          fi
          if [ ! -e "${_dscUsr}/static/control/.ctrl.${_tRee}.${_xSrl}.pid" ] \
            && [ -e "/home/${_tUsr}.ftp/clients" ]; then
            mkdir -p ${_dscUsr}/static/control
            chmod 755 ${_dscUsr}/static/control
            if [ -e "/var/xdrago/conf/control-readme.txt" ]; then
              cp -af /var/xdrago/conf/control-readme.txt \
                ${_dscUsr}/static/control/README.txt &> /dev/null
              chmod 0644 ${_dscUsr}/static/control/README.txt
            fi
            chown -R ${_tUsr}.ftp:${_usrGroup} ${_dscUsr}/static/control
            rm -f ${_dscUsr}/static/control/.ctrl.*
            echo OK > ${_dscUsr}/static/control/.ctrl.${_tRee}.${_xSrl}.pid
          fi
        fi
      fi
    done
    touch ${_pthLog}/fpm-cli.ctrl.${_tRee}.${_xSrl}.pid
  fi

  # Create the destination directory if it doesn't exist
  [ -d "/var/backups/off-run" ] || mkdir -p /var/backups/off-run

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/data/u" ] \
    && [ -e "/usr/sbin/csf" ]; then
    # Loop through all files matching the pattern /var/xdrago/run-USER
    for _file in /var/xdrago/run-*; do
      # Skip iteration if no files match the pattern
      [ -e "${_file}" ] || continue

      # Extract the _USER from the filename
      _USER=${_file#/var/xdrago/run-}

      # Define the paths to check
      _USER_DIR="/data/disk/${_USER}"
      _CANCELLED_FILE="${_USER_DIR}/log/CANCELLED"
      _PROXIED_PID_FILE="${_USER_DIR}/log/proxied.pid"
      _CLI_INFO_FILE="${_USER_DIR}/static/control/cli.info"

      # Check the conditions
      if [ ! -d "${_USER_DIR}" ] || \
         [ -f "${_CANCELLED_FILE}" ] || \
         [ -f "${_PROXIED_PID_FILE}" ] || \
         [ ! -f "${_CLI_INFO_FILE}" ]; then
        # Move the file if any condition is met
        mv -f "${_file}" /var/backups/off-run/
      fi

      if grep -q "renice 0" "${_file}"; then
        sed -i "s/renice 0/renice 9/g" "${_file}"
      fi
    done
  fi

  if [ -x "/opt/tools/drush/8/drush/drush.php" ] \
    && [ -e "${_provLeIncFull}" ] \
    && [ -e "${_hoLeIncFull}" ] \
    && [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -d "/data/u" ] \
    && [ ! -e "${_pthLog}/le_renewal_days_69.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    _leBasePath="profiles/hostmaster/modules/aegir/hosting_le"
    _lePath="${_leBasePath}/drush/${_provLeInc}"
    _leVhPath="${_leBasePath}/hosting_le_vhost/drush/${_hoLeInc}"
    for _pthSysUsr in `find /data/disk/ -maxdepth 1 -mindepth 1 | sort`; do
      if [ -e "${_pthSysUsr}/config/server_master/nginx/vhost.d" ] \
        && [ -e "${_pthSysUsr}/static/control/cli.info" ] \
        && [ ! -e "${_pthSysUsr}/log/proxied.pid" ] \
        && [ ! -e "${_pthSysUsr}/log/CANCELLED" ]; then
        _tUsr=
        _validReg=
        _validIPr=
        _tUsr=$(echo ${_pthSysUsr} | cut -d'/' -f4 | awk '{ print $1}' 2>&1)
        _dscUsr="/data/disk/${_tUsr}"
        _hmPf=$(cat ${_dscUsr}/.drush/hostmaster.alias.drushrc.php \
          | grep "root'" \
          | cut -d: -f2 \
          | awk '{ print $3}' \
          | sed "s/[\,']//g" 2>&1)
        _locFile="${_hmPf}/${_lePath}"
        if [ -e "${_locFile}" ] && [ -e "${_provLeIncFull}" ]; then
          cp -af ${_provLeIncFull} ${_locFile}
          chown ${_tUsr}:users ${_locFile}
          chmod 0644 ${_locFile}
        fi
        _locVhFile="${_hmPf}/${_leVhPath}"
        if [ -e "${_locVhFile}" ] && [ -e "${_hoLeIncFull}" ]; then
          cp -af ${_hoLeIncFull} ${_locVhFile}
          chown ${_tUsr}:users ${_locVhFile}
          chmod 0644 ${_locVhFile}
        fi
        _leRoot="${_dscUsr}/tools/le"
        _exeLe="${_leRoot}/dehydrated"
        _dehydFull="${_leRoot}/${_dehydName}"
        _legacyLeShFile="${_leRoot}/letsencrypt.sh"
        _lockLeFile="${_leRoot}/lock"
        _configIni="${_leRoot}/config"
        _acctsDir="${_leRoot}/accounts"
        _acctsDemoDir="${_leRoot}/accounts-demo"
        _demoPid="${_leRoot}/.ctrl/ssl-demo-mode.pid"
        _normalRegPid="${_leRoot}/.ctrl/normal-re6-register.pid"
        _forcedRegPid="${_leRoot}/.ctrl/forced-re6-register.pid"
        _onDemandRegPid="${_leRoot}/.ctrl/onDemand-register.pid"
        _validIdn=$(grep "letsencrypt" ${_acctsDir}/*/account_id.json 2>&1)
        _validReg=$(grep "valid" ${_acctsDir}/*/registration_info.json 2>&1)
        _validIPr=$(grep "${_LOC_IP}" ${_acctsDir}/*/registration_info.json 2>&1)
        _HOUR=$(date +%H 2>&1)
        _HOUR=${_HOUR//[^0-9-]/}
        if [ -e "${_dehydSrcPath}" ]; then
          cp -af ${_dehydSrcPath} ${_dehydFull}
          chown ${_tUsr}:users ${_dehydFull}
          chmod 0700 ${_dehydFull}
        fi
        if [ -e "${_dehydFull}" ] \
          && [ ! -e "${_normalRegPid}" ]; then
          if [ "${_HOUR}" = "5" ] \
            || [ "${_HOUR}" = "17" ] \
            || [ -e "${_onDemandRegPid}" ]; then
            su -s /bin/bash - ${_tUsr} -c "bash ${_exeLe} --register --accept-terms"
            wait
            touch ${_normalRegPid}
          fi
        fi
        if [ -e "${_lockLeFile}" ]; then
          rm -f ${_lockLeFile}
          sleep 1
        fi
        if [ -e "${_demoPid}" ]; then
          rm -f ${_demoPid}
        fi
        if [ "${_HOUR}" = "11" ] \
          || [ "${_HOUR}" = "23" ] \
          || [ -e "${_onDemandRegPid}" ]; then
          if [ -e "${_legacyLeShFile}" ] \
            || [ -e "${_acctsDemoDir}" ] \
            || [[ ! "${_validIdn}" =~ "letsencrypt" ]] \
            || [[ ! "${_validReg}" =~ "valid" ]] \
            || [[ ! "${_validIPr}" =~ "${_LOC_IP}" ]] \
            || [ ! -e "${_forcedRegPid}" ]; then
            rm -f ${_legacyLeShFile}
            rm -rf ${_acctsDemoDir}
            rm -rf ${_acctsDir}
            rm -f ${_leRoot}/.ctrl/.forced*
            rm -f ${_leRoot}/.ctrl/.normal*
            rm -f ${_leRoot}/.ctrl/forced*
            rm -f ${_leRoot}/.ctrl/normal*
            if [ -e "${_exeLe}" ]; then
              su -s /bin/bash - ${_tUsr} -c "bash ${_exeLe} --register --accept-terms"
              wait
              touch ${_forcedRegPid}
              touch ${_normalRegPid}
            fi
          fi
        fi
      fi
    done
    touch ${_pthLog}/le_renewal_days_69.ctrl.${_tRee}.${_xSrl}.pid
  fi

  if ! grep -q "defunct" /opt/local/bin/websh; then
    rm -f ${_pthLog}/websh.ctrl.*
  fi
  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_pthLog}/websh.ctrl.f72.${_tRee}.${_xSrl}.pid" ]; then
    mv -f /opt/local/bin/websh /var/xdrago/websh.sh.old
    curl ${_crlGet} "${_urlHmr}/helpers/websh.sh.txt" -o /opt/local/bin/websh
    if [ -e "/opt/local/bin/websh" ] \
      && grep -i '_forward_to_dash' /opt/local/bin/websh &> /dev/null; then
      chmod 755 /opt/local/bin/websh
      chown root:root /opt/local/bin/websh
      [ -x "/bin/websh" ] && [ ! -L "/bin/websh" ] && ln -sfn /opt/local/bin/websh /bin/websh
      touch ${_pthLog}/websh.ctrl.f72.${_tRee}.${_xSrl}.pid
    else
      mv -f /var/xdrago/websh.sh.old /opt/local/bin/websh
    fi
    _WEB_SH="$(readlink -n /bin/sh)"
    if [ -x "/opt/local/bin/websh" ] \
      && grep -i '_forward_to_dash' /opt/local/bin/websh &> /dev/null; then
      if [ "${_WEB_SH}" != "/opt/local/bin/websh" ]; then
        ln -sfn /opt/local/bin/websh /bin/sh
        if [ -e "/usr/bin/sh" ]; then
          ln -sfn /opt/local/bin/websh /usr/bin/sh
        fi
        [ -x "/bin/websh" ] && [ ! -L "/bin/websh" ] && ln -sfn /opt/local/bin/websh /bin/websh
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -x "/etc/cron.hourly/systemtime" ] \
    && [ ! -e "${_pthLog}/systemtime.ctrl.f95.${_tRee}.${_xSrl}.pid" ]; then
    curl ${_crlGet} "${_urlHmr}/helpers/systemtime" -o /etc/cron.hourly/systemtime
    if [ -e "/etc/cron.hourly/systemtime" ]; then
      chmod 755 /etc/cron.hourly/systemtime
      chown root:root /etc/cron.hourly/systemtime
      service cron restart
      touch ${_pthLog}/systemtime.ctrl.f95.${_tRee}.${_xSrl}.pid
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy.ctrl.f93.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy" ]; then
        mv -f ${_optBin}/synproxy ${_optBin}/synproxy.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy" -o ${_optBin}/synproxy
      if [ -e "${_optBin}/synproxy" ]; then
        chmod 700 ${_optBin}/synproxy
        chown root:root ${_optBin}/synproxy
        touch ${_pthLog}/synproxy.ctrl.f93.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy.old" ]; then
          mv -f ${_optBin}/synproxy.old ${_optBin}/synproxy
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy_rollback.ctrl.f94.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy_rollback" ]; then
        mv -f ${_optBin}/synproxy_rollback ${_optBin}/synproxy_rollback.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy_rollback" -o ${_optBin}/synproxy_rollback
      if [ -e "${_optBin}/synproxy_rollback" ]; then
        chmod 700 ${_optBin}/synproxy_rollback
        chown root:root ${_optBin}/synproxy_rollback
        touch ${_pthLog}/synproxy_rollback.ctrl.f94.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy_rollback.old" ]; then
          mv -f ${_optBin}/synproxy_rollback.old ${_optBin}/synproxy_rollback
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy_reassert.ctrl.f88.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy_reassert" ]; then
        mv -f ${_optBin}/synproxy_reassert ${_optBin}/synproxy_reassert.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy_reassert" -o ${_optBin}/synproxy_reassert
      if [ -e "${_optBin}/synproxy_reassert" ]; then
        chmod 700 ${_optBin}/synproxy_reassert
        chown root:root ${_optBin}/synproxy_reassert
        touch ${_pthLog}/synproxy_reassert.ctrl.f88.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy_reassert.old" ]; then
          mv -f ${_optBin}/synproxy_reassert.old ${_optBin}/synproxy_reassert
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy_hook_fix.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy_hook_fix" ]; then
        mv -f ${_optBin}/synproxy_hook_fix ${_optBin}/synproxy_hook_fix.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy_hook_fix" -o ${_optBin}/synproxy_hook_fix
      if [ -e "${_optBin}/synproxy_hook_fix" ]; then
        chmod 700 ${_optBin}/synproxy_hook_fix
        chown root:root ${_optBin}/synproxy_hook_fix
        touch ${_pthLog}/synproxy_hook_fix.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy_hook_fix.old" ]; then
          mv -f ${_optBin}/synproxy_hook_fix.old ${_optBin}/synproxy_hook_fix
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy_snapshot.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy_snapshot" ]; then
        mv -f ${_optBin}/synproxy_snapshot ${_optBin}/synproxy_snapshot.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy_snapshot" -o ${_optBin}/synproxy_snapshot
      if [ -e "${_optBin}/synproxy_snapshot" ]; then
        chmod 700 ${_optBin}/synproxy_snapshot
        chown root:root ${_optBin}/synproxy_snapshot
        touch ${_pthLog}/synproxy_snapshot.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy_snapshot.old" ]; then
          mv -f ${_optBin}/synproxy_snapshot.old ${_optBin}/synproxy_snapshot
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy_status.ctrl.f99.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy_status" ]; then
        mv -f ${_optBin}/synproxy_status ${_optBin}/synproxy_status.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy_status" -o ${_optBin}/synproxy_status
      if [ -e "${_optBin}/synproxy_status" ]; then
        chmod 700 ${_optBin}/synproxy_status
        chown root:root ${_optBin}/synproxy_status
        touch ${_pthLog}/synproxy_status.ctrl.f99.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy_status.old" ]; then
          mv -f ${_optBin}/synproxy_status.old ${_optBin}/synproxy_status
        fi
      fi
    fi
  fi

  if [ -e "/var/xdrago/monitor/check" ] \
    && [ -d "/var/aegir/drush" ] \
    && [ ! -e "${_pthLog}/synproxy_monitor.ctrl.f98.${_tRee}.${_xSrl}.pid" ]; then
    _CNT=$(pgrep -fc synproxy_rollback)
    if (( _CNT > 0 )); then
      echo "The synproxy_rollback is running!"
    else
      if [ -e "${_optBin}/synproxy_monitor" ]; then
        mv -f ${_optBin}/synproxy_monitor ${_optBin}/synproxy_monitor.old
      fi
      curl ${_crlGet} "${_urlHmr}/tools/bin/synproxy_monitor" -o ${_optBin}/synproxy_monitor
      if [ -e "${_optBin}/synproxy_monitor" ]; then
        chmod 700 ${_optBin}/synproxy_monitor
        chown root:root ${_optBin}/synproxy_monitor
        touch ${_pthLog}/synproxy_monitor.ctrl.f98.${_tRee}.${_xSrl}.pid
      else
        if [ -e "${_optBin}/synproxy_monitor.old" ]; then
          mv -f ${_optBin}/synproxy_monitor.old ${_optBin}/synproxy_monitor
        fi
      fi
    fi
  fi

  _Dir="/data/all/000/modules"
  _REDIS_E_VERSION=8.x-1.11.2
  if [ -e "/var/xdrago/manage_solr_config.sh" ]; then
    if [ ! -e "${_Dir}/redis_ten_eleven/ver-${_REDIS_E_VERSION}.${_xSrl}.info" ]; then
      mkdir -p ${_Dir}
      cd ${_Dir}
      rm -rf ${_Dir}/redis_ten_eleven
      _get_dev_contrib "redis_ten_eleven-${_REDIS_E_VERSION}.tar.gz"
      echo update > ${_Dir}/redis_ten_eleven/ver-${_REDIS_E_VERSION}.${_xSrl}.info
      find ${_Dir} -type d -exec chmod 0755 {} \; &> /dev/null
      find ${_Dir} -type f -exec chmod 0644 {} \; &> /dev/null
      touch ${_pthLog}/redis_ten_eleven.ctrl.${_xSrl}.log
    fi
  fi

  _Dir="/data/all/000/modules"
  _REDIS_T_VERSION=8.x-1.8.2
  if [ -e "/var/xdrago/manage_solr_config.sh" ]; then
    if [ ! -e "${_Dir}/redis_nine_ten/ver-${_REDIS_T_VERSION}.${_xSrl}.info" ]; then
      mkdir -p ${_Dir}
      cd ${_Dir}
      rm -rf ${_Dir}/redis_nine_ten
      _get_dev_contrib "redis_nine_ten-${_REDIS_T_VERSION}.tar.gz"
      echo update > ${_Dir}/redis_nine_ten/ver-${_REDIS_T_VERSION}.${_xSrl}.info
      find ${_Dir} -type d -exec chmod 0755 {} \; &> /dev/null
      find ${_Dir} -type f -exec chmod 0644 {} \; &> /dev/null
      touch ${_pthLog}/redis_nine_ten.ctrl.${_xSrl}.log
    fi
  fi

  _Dir="/data/all/000/modules"
  _REDIS_C_VERSION=com-19-04-2021
  if [ -e "/var/xdrago/manage_solr_config.sh" ]; then
    if [ ! -e "${_Dir}/redis_compr/ver-${_REDIS_C_VERSION}.${_xSrl}.info" ]; then
      mkdir -p ${_Dir}
      cd ${_Dir}
      rm -rf ${_Dir}/redis_compr
      _get_dev_contrib "redis_compr-${_REDIS_C_VERSION}.tar.gz"
      echo update > ${_Dir}/redis_compr/ver-${_REDIS_C_VERSION}.${_xSrl}.info
      find ${_Dir} -type d -exec chmod 0755 {} \; &> /dev/null
      find ${_Dir} -type f -exec chmod 0644 {} \; &> /dev/null
      touch ${_pthLog}/redis_compr.ctrl.${_xSrl}.log
    fi
  fi

  _Dir="/data/all/000/modules"
  _REDIS_L_VERSION=7.x-3.19.1
  if [ -e "/var/xdrago/manage_solr_config.sh" ]; then
    if [ ! -e "${_Dir}/redis_edge/ver-${_REDIS_L_VERSION}.${_xSrl}.info" ]; then
      mkdir -p ${_Dir}
      cd ${_Dir}
      rm -rf ${_Dir}/redis_edge
      _get_dev_contrib "redis_edge-${_REDIS_L_VERSION}.tar.gz"
      echo update > ${_Dir}/redis_edge/ver-${_REDIS_L_VERSION}.${_xSrl}.info
      find ${_Dir} -type d -exec chmod 0755 {} \; &> /dev/null
      find ${_Dir} -type f -exec chmod 0644 {} \; &> /dev/null
      touch ${_pthLog}/redis_edge.ctrl.${_xSrl}.log
    fi
  fi

  _Dir="/data/all/000/modules"
  _REDIS_N_VERSION=com-19-04-2021
  if [ -e "/var/xdrago/manage_solr_config.sh" ]; then
    if [ ! -e "${_Dir}/redis_eight/ver-${_REDIS_N_VERSION}.${_xSrl}.info" ]; then
      mkdir -p ${_Dir}
      cd ${_Dir}
      rm -rf ${_Dir}/redis_eight
      _get_dev_contrib "redis_eight-${_REDIS_N_VERSION}.tar.gz"
      echo update > ${_Dir}/redis_eight/ver-${_REDIS_N_VERSION}.${_xSrl}.info
      find ${_Dir} -type d -exec chmod 0755 {} \; &> /dev/null
      find ${_Dir} -type f -exec chmod 0644 {} \; &> /dev/null
      touch ${_pthLog}/redis_eight.ctrl.${_xSrl}.log
    fi
  fi
}

_fix_core_dgd() {
  # sed -i "s/^_PERMISSIONS_FIX=.*/_PERMISSIONS_FIX=YES/g" ${_barCnf}

  _saCoreS="${_saCoreN}-D7"
  _saIncDb="includes/database/database.inc"
  _saPatch="/var/xdrago/conf/${_saCoreS}.patch"

  _saQCoreN="${_saCoreN}"
  _saQCoreS="${_saQCoreN}-D8"
  _saQIncDb="core/includes/database.inc"
  _saQPatch="/var/xdrago/conf/${_saQCoreS}.patch"

  _saXCoreN="${_saCoreN}"
  _saXCoreS="${_saXCoreN}-D6"
  _saXIncDb="includes/database.inc"
  _saXPatch="/var/xdrago/conf/${_saXCoreS}.patch"

  _saBCoreP="${_saCoreN}-provision"
  _saBPatch="/var/xdrago/conf/${_saBCoreP}.patch"

  # SA-CORE D8 patch
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_saQPatch}" ]; then
    mkdir -p /var/xdrago/conf
    curl ${_crlGet} "${_urlHmr}/patches/8-core/${_saQCoreS}.patch" -o ${_saQPatch}
  fi

  # SA-CORE D7 patch
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_saPatch}" ]; then
    mkdir -p /var/xdrago/conf
    curl ${_crlGet} "${_urlHmr}/patches/7-core/${_saCoreS}.patch" -o ${_saPatch}
  fi

  # SA-CORE D6 patch
  # if [ -e "/var/xdrago" ] \
  #   && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
	#   && [ ! -e "${_saXPatch}" ]; then
	#   mkdir -p /var/xdrago/conf
	#   curl ${_crlGet} "${_urlHmr}/patches/6-core/${_saXCoreS}.patch" -o ${_saXPatch}
  # fi

  # SA-CORE for Octopus hostmaster platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -d "/data/u" ] \
    && [ -e "${_saPatch}" ]; then
    if [ -d "/data/all" ] \
      && [ ! -e "${_pthLog}/hostmaster-octopus-${_saCoreN}-fixed-d7.log" ]; then
      for _File in `find /data/disk/*/aegir/distro/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
        fi
      done
      touch ${_pthLog}/hostmaster-octopus-${_saCoreN}-fixed-d7.log
    fi
    cd
  fi

  # SA-CORE for Barracuda hostmaster platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saPatch}" ]; then
    if [ -d "/data/all" ] \
      && [ ! -e "${_pthLog}/hostmaster-barracuda-${_saCoreN}-fixed-d7.log" ]; then
      for _File in `find /var/aegir/host_master/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
        fi
      done

      for _File in `find /var/aegir/hostmaster*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
        fi
      done

      touch ${_pthLog}/hostmaster-barracuda-${_saCoreN}-fixed-d7.log
    fi
    cd
  fi

  # SA-CORE for built-in D7 platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saPatch}" ] \
    && [ ! -e "${_pthLog}/${_saCoreN}-fixed-d7.log" ]; then
    if [ -d "/data/all/000/core" ]; then
      for _Core in `find /data/all/000/core/drupal-7* \
        -maxdepth 0 -mindepth 0 | sort`; do
        cd ${_Core}
        patch -p1 < ${_saPatch} &> /dev/null
      done
    elif [ -d "/data/disk/all/000/core" ]; then
      for _Core in `find /data/disk/all/000/core/drupal-7* \
        -maxdepth 0 -mindepth 0 | sort`; do
        cd ${_Core}
        patch -p1 < ${_saPatch} &> /dev/null
      done
    fi
    touch ${_pthLog}/${_saCoreN}-fixed-d7.log
    cd
  fi

  # SA-CORE for ancient D7 platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saPatch}" ]; then
    if [ -d "/data/all" ] \
      && [ ! -e "${_pthLog}/legacy-${_saCoreN}-fixed-d7.log" ]; then
      for _File in `find /data/all/*/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
        fi
      done
      touch ${_pthLog}/legacy-${_saCoreN}-fixed-d7.log
    elif [ -d "/data/disk/all" ] \
      && [ ! -e "${_pthLog}/legacy-${_saCoreN}-fixed-d7eee.log" ]; then
      for _File in `find /data/disk/all/*/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
        fi
      done
      touch ${_pthLog}/legacy-${_saCoreN}-fixed-d7eee.log
    fi
    cd
  fi

  # SA-CORE for custom D7 platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saPatch}" ]; then
    if [ -d "/data/u" ] \
      && [ ! -e "${_pthLog}/batch-custom-${_saCoreN}-fixed-d7.log" ]; then
      for _File in `find /data/disk/*/static/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/*/*/${_saIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saCoreS}-fix.info
        fi
      done
    fi
    cd
    touch ${_pthLog}/batch-custom-${_saCoreN}-fixed-d7.log
  fi

  # SA-CORE for D8 platforms in ~/static
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saQPatch}" ]; then
    if [ -d "/data/u" ] \
      && [ ! -e "${_pthLog}/batch-custom-${_saQCoreN}-fixed-d8.log" ]; then
      for _File in `find /data/disk/*/static/*/${_saQIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/core.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saQCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saQPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saQCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/${_saQIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/core.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saQCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saQPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saQCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/${_saQIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/core.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saQCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saQPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saQCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/*/${_saQIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/core.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saQCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saQPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saQCoreS}-fix.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/*/*/${_saQIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/core.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saQCoreS}-fix.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saQPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saQCoreS}-fix.info
        fi
      done
    fi
    cd
    touch ${_pthLog}/batch-custom-${_saQCoreN}-fixed-d8.log
  fi

  # SA-CORE for built-in D6 platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saXPatch}" ] \
    && [ ! -e "${_pthLog}/${_saXCoreN}-finally-fixed-d6.log" ]; then
    if [ -d "/data/all/000/core" ]; then
      for _Core in `find /data/all/000/core/pressflow-6* \
        -maxdepth 0 -mindepth 0 | sort`; do
        cd ${_Core}
        patch -p1 < ${_saXPatch} &> /dev/null
      done
    elif [ -d "/data/disk/all/000/core" ]; then
      for _Core in `find /data/disk/all/000/core/pressflow-6* \
        -maxdepth 0 -mindepth 0 | sort`; do
        cd ${_Core}
        patch -p1 < ${_saXPatch} &> /dev/null
      done
    fi
    touch ${_pthLog}/${_saXCoreN}-finally-fixed-d6.log
    cd
  fi

  # SA-CORE for ancient D6 platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saXPatch}" ]; then
    if [ -d "/data/all" ] \
      && [ ! -e "${_pthLog}/legacy-${_saXCoreN}-finally-fixed-d6.log" ]; then
      for _File in `find /data/all/*/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
        fi
      done
      touch ${_pthLog}/legacy-${_saXCoreN}-finally-fixed-d6.log
    elif [ -d "/data/disk/all" ] \
      && [ ! -e "${_pthLog}/legacy-${_saXCoreN}-finally-fixed-d6eee.log" ]; then
      for _File in `find /data/disk/all/*/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] && [ ! -e "${_Core}/core" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
        fi
      done
      touch ${_pthLog}/legacy-${_saXCoreN}-finally-fixed-d6eee.log
    fi
    cd
  fi

  # SA-CORE for custom D6 platforms
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ -e "${_saXPatch}" ]; then
    if [ -d "/data/u" ] \
      && [ ! -e "${_pthLog}/batch-custom-${_saXCoreN}-finally-fixed-d6.log" ]; then
      for _File in `find /data/disk/*/static/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saXCoreS}-fix-finally.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saXCoreS}-fix-finally.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saXCoreS}-fix-finally.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saXCoreS}-fix-finally.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saXCoreS}-fix-finally.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saXCoreS}-fix-finally.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saXCoreS}-fix-finally.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saXCoreS}-fix-finally.info
        fi
      done
      for _File in `find /data/disk/*/static/*/*/*/*/*/${_saXIncDb} \
        -maxdepth 0 -mindepth 0 | sort`; do
        _Core=$(echo ${_File} \
          | sed 's/\/includes.*//g' \
          | awk '{print $1}' 2> /dev/null)
        if [ -d "${_Core}" ] \
          && [ ! -e "${_Core}/core" ] \
          && [ ! -e "${_Core}/profiles/${_saXCoreS}-fix-finally.info" ]; then
          cd ${_Core}
          patch -p1 < ${_saXPatch} &> /dev/null
          echo fixed > ${_Core}/profiles/${_saXCoreS}-fix-finally.info
        fi
      done
    fi
    cd
    touch ${_pthLog}/batch-custom-${_saXCoreN}-finally-fixed-d6.log
  fi
}

_fix_ping_perms() {
  if [ -e "/bin/ping" ]; then
    _PING_TEST=$(ls -la /bin/ping | grep rwsr-xr-x 2>&1)
    if [ -z "${_PING_TEST}" ]; then
      chown root:root /bin/ping
      chmod 4755 /bin/ping
    fi
  fi
}

_fix_fpm_process_max() {
  if [ ! -e "${_pthLog}/process.max.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    sed -i "s/process.max =.*/process.max = 0/g" /opt/php*/etc/php*-fpm.conf
    touch ${_pthLog}/process.max.ctrl.${_tRee}.${_xSrl}.pid
  fi
}

_fix_node_in_lshell_access() {
  if [ ! -e "${_pthLog}/node.lshell-fix-npx.ctrl.${_tRee}.${_xSrl}.pid" ] \
    && [ -e "/etc/lshell.conf" ]; then
    _PrTestPhantom=$(grep "PHANTOM" /root/.*.octopus.cnf 2>&1)
    _PrTestCluster=$(grep "CLUSTER" /root/.*.octopus.cnf 2>&1)
    _PrTestUltra=$(grep "ULTRA" /root/.*.octopus.cnf 2>&1)
    _PrTestMonster=$(grep "MONSTER" /root/.*.octopus.cnf 2>&1)
    if [[ "${_PrTestPhantom}" =~ "PHANTOM" ]] \
      || [[ "${_PrTestCluster}" =~ "CLUSTER" ]] \
      || [[ "${_PrTestUltra}" =~ "ULTRA" ]] \
      || [[ "${_PrTestMonster}" =~ "MONSTER" ]] \
      || [ -e "/root/.allow.node.lshell.cnf" ]; then
      _ALLOW_NODE=YES
    else
      _ALLOW_NODE=NO
      sed -i \
        -e "s/, 'node', 'npm', 'npx',/,/gi" \
        -e "s/, 'scp',/,/gi" \
        /etc/lshell.conf /var/xdrago/conf/lshell.conf
    fi
    touch ${_pthLog}/node.lshell-fix-npx.ctrl.${_tRee}.${_xSrl}.pid
  fi
}

_fix_php_in_lshell_access() {
  if [ ! -e "${_pthLog}/php.lshell-fix-php.ctrl.${_tRee}.${_xSrl}.pid" ] \
    && [ -e "/etc/lshell.conf" ]; then
    _PrTestPhantom=$(grep "PHANTOM" /root/.*.octopus.cnf 2>&1)
    _PrTestCluster=$(grep "CLUSTER" /root/.*.octopus.cnf 2>&1)
    _PrTestUltra=$(grep "ULTRA" /root/.*.octopus.cnf 2>&1)
    _PrTestMonster=$(grep "MONSTER" /root/.*.octopus.cnf 2>&1)
    if [[ "${_PrTestPhantom}" =~ "PHANTOM" ]] \
      || [[ "${_PrTestCluster}" =~ "CLUSTER" ]] \
      || [[ "${_PrTestUltra}" =~ "ULTRA" ]] \
      || [[ "${_PrTestMonster}" =~ "MONSTER" ]] \
      || [ -e "/root/.allow.php.lshell.cnf" ]; then
      _ALLOW_PHP=YES
    else
      _ALLOW_PHP=NO
      sed -i \
        -e "s/, 'php.*':.*php',/,/gi" \
        -e "s/, '\/opt\/php.*',/,/gi" \
        /etc/lshell.conf /var/xdrago/conf/lshell.conf
    fi
    touch ${_pthLog}/php.lshell-fix-php.ctrl.${_tRee}.${_xSrl}.pid
  fi
}

_if_fix_lshell() {
  if [ ! -e "/usr/local/etc/lshell.conf" ] \
    && [ ! -L "/usr/local/etc/lshell.conf" ] \
    && [ -e "/etc/lshell.conf" ]; then
    [ ! -d "/usr/local/etc" ] && mkdir -p /usr/local/etc
    ln -sfn /etc/lshell.conf /usr/local/etc/lshell.conf
  fi
  _LSHELL_VRN=0.10
  _PATH_LSHELL="${_usrBin}/lshell"
  _LSHELL_CHK_VRN=0.10
  _LSHELL_FORCE_REINSTALL=NO
  _isLshell="$(which lshell)"
  _LSHELL_ITD=$(${_isLshell} --version 2>&1 \
    | tr -d "\n" \
    | cut -d"-" -f2 \
    | awk '{ print $1}' 2>&1)
  if [ -z "${_isLshell}" ] \
    || [ -z "${_PATH_LSHELL}" ] \
    || [ "${_LSHELL_ITD}" != "${_LSHELL_CHK_VRN}" ] \
    || [[ "${_LSHELL_ITD}" =~ "Traceback" ]] \
    || [[ "${_LSHELL_ITD}" =~ "bad interpreter" ]] \
    || [[ "${_LSHELL_ITD}" =~ "ImportError" ]]; then
    _LSHELL_FORCE_REINSTALL=YES
  fi
  if [ "${_LSHELL_FORCE_REINSTALL}" = "YES" ]; then
    [ -f "/etc/lshell.conf" ] && cp -af /etc/lshell.conf /etc/lshell.conf-bak-${_LSHELL_VRN}
    _apt_clean_update
    apt-get install python3-pip ${_aptYesUnth}
    if [ -x "/usr/bin/pip3" ]; then
      _usePip=/usr/bin/pip3
    elif [ -x "/usr/local/bin/pip3" ]; then
      _usePip=/usr/local/bin/pip3
    fi
    _PIP_TEST=$(${_usePip} --version 2>&1)
    if [[ "${_PIP_TEST}" =~ "python 3.11" ]] \
      || [[ "${_PIP_TEST}" =~ "python 3.12" ]] \
      || [[ "${_PIP_TEST}" =~ "python 3.13" ]]; then
      ${_usePip} install --upgrade pip --root-user-action ignore
    else
      ${_usePip} install --upgrade pip
    fi
    cd /var/opt
    rm -rf lshell*
    _get_dev_src "lshell-${_LSHELL_VRN}.tar.gz"
    for _Files in `find /var/opt/lshell-${_LSHELL_VRN} -type f`; do
      sed -i "s/kicked/logged/g" ${_Files} &> /dev/null
      wait
      sed -i "s/Kicked/Logged/g" ${_Files} &> /dev/null
      wait
    done
    rm -rf /usr/local/lib/python*/site-packages/lshell*
    rm -rf /usr/local/lib/python*/dist-packages/lshell*
    cd /var/opt/lshell-${_LSHELL_VRN}
    _PIP_TEST=$(${_usePip} --version 2>&1)
    if [[ "${_PIP_TEST}" =~ "python 3.11" ]] \
      || [[ "${_PIP_TEST}" =~ "python 3.12" ]] \
      || [[ "${_PIP_TEST}" =~ "python 3.13" ]]; then
      ${_usePip} install . --break-system-packages --root-user-action ignore
    else
      ${_usePip} install .
    fi
    [ -f "/etc/lshell.conf-bak-${_LSHELL_VRN}" ] && cp -af /etc/lshell.conf-bak-${_LSHELL_VRN} /etc/lshell.conf
    rm -f /etc/logrotate.d/lshell
    addgroup --system lshellg &> /dev/null
    addgroup --system ltd-shell-more &> /dev/null
    mkdir -p /var/log/lsh
    chown :lshellg /var/log/lsh
    chmod 770 /var/log/lsh &> /dev/null
    # Kill all non-root logged-in users
    who | awk '$1 !~ /^root$/ { cmd = "pkill -KILL -u " $1; system(cmd) }'
    touch ${_pthLog}/lshell-fix-build-${_LSHELL_VRN}.log
  fi
  if [ -e "${_usrBin}/lshell" ]; then
    chown root:users ${_usrBin}/lshell
    chmod 750 ${_usrBin}/lshell
    if [ ! -L "/usr/bin/lshell" ]; then
      ln -sfn ${_usrBin}/lshell /usr/bin/lshell &> /dev/null
    fi
  fi
}

_fix_start_stop_ports_solr() {
  if [ -x "/etc/init.d/solr9" ] && [ -e "/etc/default/solr9.in.sh" ]; then
    _SOLR9_STOP_TEST=$(grep "STOP\.PORT=19099" /etc/default/solr9.in.sh 2>&1)
    _SOLR9_WAIT_TEST=$(grep "SOLR_START_WAIT=" /etc/default/solr9.in.sh 2>&1)
    if [ ! -e "/var/log/boa/solr9.in.004.fixed.pid" ] \
      || [[ ! "${_SOLR9_STOP_TEST}" =~ "19099" ]] \
      || [[ ! "${_SOLR9_WAIT_TEST}" =~ "10" ]]; then
      sed -i "s/^SOLR_STOP_PORT.*//g" /etc/default/solr9.in.sh
      sed -i "s/^SOLR_STOP_KEY.*//g" /etc/default/solr9.in.sh
      sed -i "s/.*mycustomkey9.*//g" /etc/default/solr9.in.sh
      sed -i "s/.*_WAIT.*//g" /etc/default/solr9.in.sh
      echo "SOLR_OPTS=\"\$SOLR_OPTS -DSTOP.PORT=19099 -DSTOP.KEY=mycustomkey9\"" >> /etc/default/solr9.in.sh
      echo "SOLR_START_WAIT=\"10\"" >> /etc/default/solr9.in.sh
      echo "SOLR_STOP_WAIT=\"10\"" >> /etc/default/solr9.in.sh
      echo "SOLR_WAIT_FOR_ZK=\"10\"" >> /etc/default/solr9.in.sh
      sed -i "/^$/d" /etc/default/solr9.in.sh
      echo "_restartSolr9 at $(date)" >> ${_pthLog}/_fix_start_stop_ports_solr.log
      touch /var/log/boa/solr9.in.004.fixed.pid
      service solr9 restart
    fi
  fi
  if [ -x "/etc/init.d/solr7" ] && [ -e "/etc/default/solr7.in.sh" ]; then
    _SOLR7_STOP_TEST=$(grep "STOP\.PORT=17077" /etc/default/solr7.in.sh 2>&1)
    _SOLR7_WAIT_TEST=$(grep "SOLR_START_WAIT=" /etc/default/solr7.in.sh 2>&1)
    if [ ! -e "/var/log/boa/solr7.in.004.fixed.pid" ] \
      || [[ ! "${_SOLR7_STOP_TEST}" =~ "17077" ]] \
      || [[ ! "${_SOLR7_WAIT_TEST}" =~ "10" ]]; then
      sed -i "s/^SOLR_STOP_PORT.*//g" /etc/default/solr7.in.sh
      sed -i "s/^SOLR_STOP_KEY.*//g" /etc/default/solr7.in.sh
      sed -i "s/.*mycustomkey7.*//g" /etc/default/solr7.in.sh
      sed -i "s/.*_WAIT.*//g" /etc/default/solr7.in.sh
      echo "SOLR_OPTS=\"\$SOLR_OPTS -DSTOP.PORT=17077 -DSTOP.KEY=mycustomkey7\"" >> /etc/default/solr7.in.sh
      echo "SOLR_START_WAIT=\"10\"" >> /etc/default/solr7.in.sh
      echo "SOLR_STOP_WAIT=\"10\"" >> /etc/default/solr7.in.sh
      echo "SOLR_WAIT_FOR_ZK=\"10\"" >> /etc/default/solr7.in.sh
      sed -i "/^$/d" /etc/default/solr7.in.sh
      echo "_restartSolr7 at $(date)" >> ${_pthLog}/_fix_start_stop_ports_solr.log
      touch /var/log/boa/solr7.in.004.fixed.pid
      service solr7 restart
    fi
  fi
  if [ -x "/etc/init.d/jetty9" ]; then
    _restartSolr4=FALSE
    _ctrl_jetty_nr=$(ls -la /tmp/jetty-0.0.0.0-8099-solr.war* | wc -l 2>&1)
    if [[ ! "${_ctrl_jetty_nr}" =~ "No such file" ]] && [ "${_ctrl_jetty_nr}" -gt 8 ]; then
      _restartSolr4=TRUE
    fi
    if [ "${_restartSolr4}" = "TRUE" ]; then
      if [ ! -x "/etc/init.d/jenkins" ] && [ ! -e "/var/lib/jenkins" ]; then
        find /tmp -mindepth 1 -user jetty9 -exec rm -rf {} + 2>/dev/null
        pkill -9 -f jetty9
        echo "_restartSolr4 at $(date)" >> ${_pthLog}/_fix_start_stop_ports_solr.log
      fi
    fi
  fi
}

_fix_log4j_solr7() {
  _LOG4J_VRN=2.17.1
  _DO_SOLR_RESTART=
  if [ -x "/etc/init.d/solr7" ] && [ -e "/etc/default/solr7.in.sh" ]; then
    if [ -e "/opt/solr-7.7.3" ] \
      && [ ! -e "/opt/solr-7.7.3/server/lib/ext/log4j-core-${_LOG4J_VRN}.jar" ]; then
      cd /var/opt
      rm -rf apache-log4j*
      _get_dev_src "apache-log4j-${_LOG4J_VRN}-bin.tar.gz"
      if [ -e "/var/opt/apache-log4j-${_LOG4J_VRN}-bin/log4j-core-${_LOG4J_VRN}.jar" ]; then
        cd /var/opt/apache-log4j-${_LOG4J_VRN}-bin
        [ -d "/var/backups/log4j/solr-7.7.3" ] || mkdir -p /var/backups/log4j/solr-7.7.3
        mv -f /opt/solr-7.7.3/server/lib/ext/log4j* /var/backups/log4j/solr-7.7.3/
        rm -f /opt/solr-7.7.3/contrib/prometheus-exporter/lib/log4j*
        cp -af log4j-1.2-api-${_LOG4J_VRN}.jar    /opt/solr-7.7.3/server/lib/ext/
        cp -af log4j-core-${_LOG4J_VRN}.jar       /opt/solr-7.7.3/server/lib/ext/
        cp -af log4j-core-${_LOG4J_VRN}.jar       /opt/solr-7.7.3/contrib/prometheus-exporter/lib/
        cp -af log4j-slf4j-impl-${_LOG4J_VRN}.jar /opt/solr-7.7.3/server/lib/ext/
        cp -af log4j-slf4j-impl-${_LOG4J_VRN}.jar /opt/solr-7.7.3/contrib/prometheus-exporter/lib/
        cp -af log4j-api-${_LOG4J_VRN}.jar        /opt/solr-7.7.3/server/lib/ext/
        cp -af log4j-api-${_LOG4J_VRN}.jar        /opt/solr-7.7.3/contrib/prometheus-exporter/lib/
        chown root:root /opt/solr-7.7.3/server/lib/ext/log4j*
        chown root:root /opt/solr-7.7.3/contrib/prometheus-exporter/lib/log4j*
        _DO_SOLR_RESTART=YES
      fi
    fi
    if [ -e "/opt/solr-7.6.0" ] \
      && [ ! -e "/opt/solr-7.6.0/server/lib/ext/log4j-core-${_LOG4J_VRN}.jar" ]; then
      cd /var/opt
      rm -rf apache-log4j*
      _get_dev_src "apache-log4j-${_LOG4J_VRN}-bin.tar.gz"
      if [ -e "/var/opt/apache-log4j-${_LOG4J_VRN}-bin/log4j-core-${_LOG4J_VRN}.jar" ]; then
        cd /var/opt/apache-log4j-${_LOG4J_VRN}-bin
        [ -d "/var/backups/log4j/solr-7.6.0" ] || mkdir -p /var/backups/log4j/solr-7.6.0
        mv -f /opt/solr-7.6.0/server/lib/ext/log4j* /var/backups/log4j/solr-7.6.0/
        rm -f /opt/solr-7.6.0/contrib/prometheus-exporter/lib/log4j*
        cp -af log4j-1.2-api-${_LOG4J_VRN}.jar    /opt/solr-7.6.0/server/lib/ext/
        cp -af log4j-core-${_LOG4J_VRN}.jar       /opt/solr-7.6.0/server/lib/ext/
        cp -af log4j-core-${_LOG4J_VRN}.jar       /opt/solr-7.6.0/contrib/prometheus-exporter/lib/
        cp -af log4j-slf4j-impl-${_LOG4J_VRN}.jar /opt/solr-7.6.0/server/lib/ext/
        cp -af log4j-slf4j-impl-${_LOG4J_VRN}.jar /opt/solr-7.6.0/contrib/prometheus-exporter/lib/
        cp -af log4j-api-${_LOG4J_VRN}.jar        /opt/solr-7.6.0/server/lib/ext/
        cp -af log4j-api-${_LOG4J_VRN}.jar        /opt/solr-7.6.0/contrib/prometheus-exporter/lib/
        chown root:root /opt/solr-7.6.0/server/lib/ext/log4j*
        chown root:root /opt/solr-7.6.0/contrib/prometheus-exporter/lib/log4j*
        _DO_SOLR_RESTART=YES
      fi
    fi
    _RESULT_LOG4J=$(grep "LOG4J_FORMAT_MSG_NO_LOOKUPS=true" /etc/default/solr7.in.sh 2>&1)
    if [[ ! "${_RESULT_LOG4J}" =~ "LOG4J" ]]; then
      echo "LOG4J_FORMAT_MSG_NO_LOOKUPS=true" >> /etc/default/solr7.in.sh
    fi
    if [[ ! "${_RESULT_LOG4J}" =~ "LOG4J" ]] || [ ! -z "${_DO_SOLR_RESTART}" ]; then
      #pkill -9 -f solr7
      service solr7 restart &> /dev/null
    fi
  fi
}

_fix_authorized_keys() {
  if [ ! -e "${_pthLog}/_fix_authorized_keys.ctrl.${_tRee}.${_xSrl}.pid" ]; then
    chmod 0600 /home/*/.ssh/authorized_keys &> /dev/null
    chmod 0700 /home/*/.ssh &> /dev/null
    touch ${_pthLog}/_fix_authorized_keys.ctrl.${_tRee}.${_xSrl}.pid
  fi
}

_fix_aio() {
  _AIO_FIX=$(grep "fs.aio-max-nr" /etc/sysctl.conf 2>&1)
  if [ -z "${_AIO_FIX}" ]; then
    echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
  fi
}

_fix_console_print() {
  _PRK_FIX=$(grep "kernel.printk" /etc/sysctl.conf 2>&1)
  if [ -z "${_PRK_FIX}" ]; then
    echo "kernel.printk = 4 1 1 7" >> /etc/sysctl.conf
  fi
}

_fix_java_symlinks() {
  if [ "${_OS_CODE}" = "jessie" ] && [ -x "/usr/lib/jvm/java-7-openjdk/jre/bin/java" ]; then
    if [ ! -e "/usr/bin/java" ] || [ ! -e "/etc/alternatives/java" ]; then
      ln -sfn /usr/lib/jvm/java-7-openjdk/jre/bin/java /etc/alternatives/java
      ln -sfn /etc/alternatives/java /usr/bin/java
      echo fixed java symlinks for ${_OS_CODE}
    fi
  fi
  if [ "${_OS_CODE}" = "stretch" ] && [ -x "/usr/lib/jvm/java-8-openjdk/jre/bin/java" ]; then
    if [ ! -e "/usr/bin/java" ] || [ ! -e "/etc/alternatives/java" ]; then
      ln -sfn /usr/lib/jvm/java-8-openjdk/jre/bin/java /etc/alternatives/java
      ln -sfn /etc/alternatives/java /usr/bin/java
      echo fixed java symlinks for ${_OS_CODE}
    fi
  fi
  if [ "${_OS_CODE}" = "excalibur" ] \
    || [ "${_OS_CODE}" = "daedalus" ] \
    || [ "${_OS_CODE}" = "chimaera" ]; then
    if [ ! -e "/usr/lib/jvm/java-21-openjdk" ] \
      && [ -d "/usr/lib/jvm/java-21-openjdk-amd64" ]; then
      ln -sfn /usr/lib/jvm/java-21-openjdk-amd64 /usr/lib/jvm/java-21-openjdk
    fi
    if [ ! -e "/usr/bin/java21" ] \
      && [ -e "/usr/lib/jvm/java-21-openjdk-amd64/bin/java" ]; then
      ln -sfn /usr/lib/jvm/java-21-openjdk-amd64/bin/java /usr/bin/java21
    fi
    if [ ! -e "/usr/lib/jvm/java-17-openjdk" ] \
      && [ -d "/usr/lib/jvm/java-17-openjdk-amd64" ]; then
      ln -sfn /usr/lib/jvm/java-17-openjdk-amd64 /usr/lib/jvm/java-17-openjdk
    fi
    if [ ! -e "/usr/bin/java17" ] \
      && [ -e "/usr/lib/jvm/java-17-openjdk-amd64/bin/java" ]; then
      ln -sfn /usr/lib/jvm/java-17-openjdk-amd64/bin/java /usr/bin/java17
    fi
    if [ ! -e "/usr/lib/jvm/java-11-openjdk" ] \
      && [ -d "/usr/lib/jvm/java-11-openjdk-amd64" ]; then
      ln -sfn /usr/lib/jvm/java-11-openjdk-amd64 /usr/lib/jvm/java-11-openjdk
    fi
    if [ ! -e "/usr/bin/java11" ] \
      && [ -e "/usr/lib/jvm/java-11-openjdk-amd64/bin/java" ]; then
      ln -sfn /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/bin/java11
    fi
    if [ -x "/etc/init.d/jenkins" ] && [ -e "/var/lib/jenkins" ]; then
      _LOOK_LIKE_JENKINS=TRUE
    elif [ -e "/root/.look.like.jenkins.cnf" ]; then
      _LOOK_LIKE_JENKINS=TRUE
    else
      _LOOK_LIKE_JENKINS=FALSE
    fi
    if [ "${_LOOK_LIKE_JENKINS}" = "TRUE" ] \
      || [ "${_OS_CODE}" = "daedalus" ] \
      || [ "${_OS_CODE}" = "excalibur" ]; then
      if [ -x "/usr/lib/jvm/java-17-openjdk/bin/java" ] \
        && [ ! -e "/var/log/boa/.fixed-java17-symlinks.log" ]; then
        if [ -e "/usr/lib/jvm/java-17-openjdk-amd64" ]; then
          rm -f /usr/lib/jvm/default-java
          ln -sfn /usr/lib/jvm/java-17-openjdk-amd64 /usr/lib/jvm/default-java
        fi
        ln -sfn /usr/lib/jvm/java-17-openjdk/bin/java /etc/alternatives/java
        ln -sfn /etc/alternatives/java /usr/bin/java
        touch /var/log/boa/.fixed-java17-symlinks.log
        echo "Fixed Java 17 symlinks for ${_OS_CODE}"
      fi
      if [ -x "/usr/lib/jvm/java-21-openjdk/bin/java" ] \
        && [ ! -e "/var/log/boa/.fixed-java21-symlinks.log" ]; then
        if [ -e "/usr/lib/jvm/java-21-openjdk-amd64" ]; then
          rm -f /usr/lib/jvm/default-java
          ln -sfn /usr/lib/jvm/java-21-openjdk-amd64 /usr/lib/jvm/default-java
        fi
        ln -sfn /usr/lib/jvm/java-21-openjdk/bin/java /etc/alternatives/java
        ln -sfn /etc/alternatives/java /usr/bin/java
        touch /var/log/boa/.fixed-java21-symlinks.log
        echo "Fixed Java 21 symlinks for ${_OS_CODE}"
      fi
    else
      if [ -x "/usr/lib/jvm/java-11-openjdk/bin/java" ]; then
        if [ -e "/usr/lib/jvm/java-11-openjdk-amd64" ]; then
          rm -f /usr/lib/jvm/default-java
          ln -sfn /usr/lib/jvm/java-11-openjdk-amd64 /usr/lib/jvm/default-java
        fi
        if [ ! -e "/usr/bin/java" ] || [ ! -e "/etc/alternatives/java" ]; then
          ln -sfn /usr/lib/jvm/java-11-openjdk/bin/java /etc/alternatives/java
          ln -sfn /etc/alternatives/java /usr/bin/java
          echo "Fixed Java 11 symlinks for ${_OS_CODE}"
        fi
      fi
    fi
  else
    if [ -x "/usr/lib/jvm/java-11-openjdk/bin/java" ]; then
      if [ ! -e "/usr/bin/java" ] || [ ! -e "/etc/alternatives/java" ]; then
        ln -sfn /usr/lib/jvm/java-11-openjdk/bin/java /etc/alternatives/java
        ln -sfn /etc/alternatives/java /usr/bin/java
        echo "Fixed Java 11 symlinks for ${_OS_CODE}"
      fi
    fi
  fi
}

_fix_composer_version() {
  _COMPOSER_VRN=2.8.2
  if [ -x "/usr/local/bin/composer" ]; then
    _COMPOSER_IS=$(composer --no-interaction --version 2>&1 \
      | tr -d "\n" \
      | cut -d" " -f35 \
      | awk '{ print $1}' 2>&1)
    if [ "${_COMPOSER_IS}" != "${_COMPOSER_VRN}" ]; then
      composer self-update ${_COMPOSER_VRN} &> /dev/null
    fi
  fi
}

_fix_sftp_server() {
  if [ -e "/etc/ssh/sshd_config" ]; then
    _SFTP_UMASK_TEST=$(grep "sftp-server -u 0002" /etc/ssh/sshd_config 2>&1)
    if [[ ! "${_SFTP_UMASK_TEST}" =~ "sftp-server -u 0002" ]]; then
      sed -i "s/^Subsystem.*//g" /etc/ssh/sshd_config
      echo "Subsystem sftp /usr/lib/openssh/sftp-server -u 0002" >> /etc/ssh/sshd_config
      sed -i "/^$/d" /etc/ssh/sshd_config
      service ssh restart 2> /dev/null
    fi
  fi
}

_fix_wkhtml_perms() {

  _WKHTML_ARRAY="/usr/local/bin/wkhtmltopdf \
                  /usr/bin/wkhtmltopdf \
                  /usr/bin/wkhtmltopdf-0.12.4 \
                  /usr/local/bin/wkhtmltoimage \
                  /usr/bin/wkhtmltoimage \
                  /usr/bin/wkhtmltoimage-0.12.4"

  for _WKHTML_ITEM in ${_WKHTML_ARRAY}; do
    if [ -x "${_WKHTML_ITEM}" ]; then
      _PERM_TEST=$(ls -la ${_WKHTML_ITEM} | grep rwxr-xr-x 2>&1)
      if [ -z "${_PERM_TEST}" ]; then
        chgrp root ${_WKHTML_ITEM} &> /dev/null
        chmod 755 ${_WKHTML_ITEM} &> /dev/null
      fi
    fi
  done
}

_fix_wkhtml() {
  if [ -x "/usr/local/bin/wkhtmltopdf" ] \
    && [ -L "/usr/bin/wkhtmltopdf" ]; then
    rm -f /usr/bin/wkhtmltopdf
    cp -af /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
    chgrp root /usr/bin/wkhtmltopdf &> /dev/null
    chmod 755 /usr/bin/wkhtmltopdf &> /dev/null
  fi
  if [ -x "/usr/local/bin/wkhtmltoimage" ] \
    && [ -L "/usr/bin/wkhtmltoimage" ]; then
    rm -f /usr/bin/wkhtmltoimage
    cp -af /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
    chgrp root /usr/bin/wkhtmltoimage &> /dev/null
    chmod 755 /usr/bin/wkhtmltoimage &> /dev/null
  fi
  if [ -x "/usr/local/bin/wkhtmltopdf" ] \
    && [ ! -e "/usr/bin/wkhtmltopdf" ]; then
    cp -af /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
    chgrp root /usr/bin/wkhtmltopdf &> /dev/null
    chmod 755 /usr/bin/wkhtmltopdf &> /dev/null
  fi
  if [ -x "/usr/local/bin/wkhtmltoimage" ] \
    && [ ! -e "/usr/bin/wkhtmltoimage" ]; then
    cp -af /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
    chgrp root /usr/bin/wkhtmltoimage &> /dev/null
    chmod 755 /usr/bin/wkhtmltoimage &> /dev/null
  fi
  if [ ! -x "/usr/local/bin/wkhtmltopdf" ] \
    && [ -x "/usr/bin/wkhtmltopdf" ]; then
    rm -f /usr/local/bin/wkhtmltopdf
    cp -af /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
    chgrp root /usr/local/bin/wkhtmltopdf &> /dev/null
    chmod 755 /usr/local/bin/wkhtmltopdf &> /dev/null
  fi
  if [ ! -x "/usr/local/bin/wkhtmltoimage" ] \
    && [ -x "/usr/bin/wkhtmltoimage" ]; then
    rm -f /usr/local/bin/wkhtmltoimage
    cp -af /usr/bin/wkhtmltoimage /usr/local/bin/wkhtmltoimage
    chgrp root /usr/local/bin/wkhtmltoimage &> /dev/null
    chmod 755 /usr/local/bin/wkhtmltoimage &> /dev/null
  fi
}

_fix_eldir() {
  if [ -e "/var/xdrago" ] \
    && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ ! -e "${_eldirP}" ]; then
    mkdir -p /var/xdrago/conf
    curl ${_crlGet} "${_urlHmr}/patches/${_eldirF}" -o ${_eldirP}
  fi
}

_if_drupal_patches_update() {
  if [ -e "/var/xdrago" ]; then
    _BROKEN_UPDATE_TEST_A=$(grep "Under Construction" /data/conf/patches/* 2>&1)
    _BROKEN_UPDATE_TEST_B=$(grep "404 Not Found" /data/conf/patches/* 2>&1)
    if [ ! -z "${_BROKEN_UPDATE_TEST_A}" ] \
      || [ ! -z "${_BROKEN_UPDATE_TEST_B}" ] \
      || [ ! -e "/data/conf/patches/ctrl.f96.${_tRee}.${_xSrl}.pid" ]; then
      mkdir -p /data/conf/patches
      rm -f /data/conf/patches/*
      touch /data/conf/patches/ctrl.f96.${_tRee}.${_xSrl}.pid
    fi
  fi
}

_fix_drupal_core_ten() {
  if [ -e "/var/xdrago" ]; then
    if [ ! -e "${_tenCorePatchPath}" ]; then
      mkdir -p /data/conf/patches
      curl ${_crlGet} "${_urlHmr}/patches/${_tenCorePatchFname}" -o ${_tenCorePatchPath}
    fi
    if [ ! -e "${_tenConsolePatchPath}" ]; then
      mkdir -p /data/conf/patches
      curl ${_crlGet} "${_urlHmr}/patches/${_tenConsolePatchFname}" -o ${_tenConsolePatchPath}
    fi
  fi
}

_fix_drupal_core_eleven() {
  if [ -e "/var/xdrago" ]; then
    if [ ! -e "${_elevenCorePatchPath}" ]; then
      mkdir -p /data/conf/patches
      curl ${_crlGet} "${_urlHmr}/patches/${_elevenCorePatchFname}" -o ${_elevenCorePatchPath}
    fi
    if [ ! -e "${_elevenConsolePatchPath}" ]; then
      mkdir -p /data/conf/patches
      curl ${_crlGet} "${_urlHmr}/patches/${_elevenConsolePatchFname}" -o ${_elevenConsolePatchPath}
    fi
    if [ ! -e "${_elevenValidatorPatchPath}" ]; then
      mkdir -p /data/conf/patches
      curl ${_crlGet} "${_urlHmr}/patches/${_elevenValidatorPatchFname}" -o ${_elevenValidatorPatchPath}
    fi
  fi
}

_fix_pure_ftpd() {
  if [ -e "/usr/local/etc/pure-ftpd.conf" ]; then
    _PAM_AUTH=$(grep "^PAMAuthentication" /usr/local/etc/pure-ftpd.conf 2>&1)
    if [ ! -z "${_PAM_AUTH}" ]; then
      sed -i "s/^PAMAuthentication/# PAMAuthentication/g" /usr/local/etc/pure-ftpd.conf
      killall -9 pure-ftpd &> /dev/null
    fi
  fi
}

_fix_hosting_le() {
  if [ -d "/var/xdrago/conf" ]; then
    if [ ! -e "${_hoLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid" ] \
      || [ ! -e "${_pthLog}/dehydrated-up01.ctrl.${_tRee}.${_xSrl}.pid" ] \
      || [ -e "/var/xdrago/${_provLeInc}" ] \
      || [ -e "/var/xdrago/${_hoLeInc}" ] \
      || [ -e "/var/xdrago/${_dehydName}" ] \
      || [ -e "/root/${_provLeInc}" ] \
      || [ -e "/root/hosting_le_vhost.drush.inc.ctrl.${_tRee}.${_xSrl}.pid" ] \
      || [ -e "/root/${_hoLeInc}" ] \
      || [ -e "${_legacyLeSh}" ] \
      || [ ! -e "${_dehydSrcPath}" ] \
      || [ ! -e "${_provLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid" ]; then
      mkdir -p /var/xdrago/conf
      rm -f /var/xdrago/*.drush.inc*
      rm -f /root/*.drush.inc*
      rm -f ${_legacyLeSh}
      rm -f ${_dehydSrcPath}.ctrl.${_tRee}.${_xSrl}.pid
      rm -f ${_hoLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid
      rm -f ${_provLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid
      curl ${_crlGet} "${_urlHmr}/helpers/${_dehydName}" -o ${_dehydSrcPath}.ctrl.${_tRee}.${_xSrl}.pid
      cp -af ${_dehydSrcPath}.ctrl.${_tRee}.${_xSrl}.pid ${_dehydSrcPath}
      curl ${_crlGet} "${_urlHmr}/patches/${_hoLeInc}" -o ${_hoLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid
      cp -af ${_hoLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid ${_hoLeIncFull}
      curl ${_crlGet} "${_urlHmr}/patches/${_provLeInc}" -o ${_provLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid
      if [ -e "${_provLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid" ]; then
        cp -af ${_provLeIncFull}.ctrl.${_tRee}.${_xSrl}.pid ${_provLeIncFull}
        [ -e "${_provLeIncFull}" ] && touch ${_pthLog}/dehydrated-up01.ctrl.${_tRee}.${_xSrl}.pid
      fi
    fi
  fi
}

_fix_newrelic() {
  _PHP_EXT_DIR_84="/opt/php84/lib/php/extensions/no-debug-non-zts-20240924"
  _NR_SO="/usr/lib/newrelic-php5/agent/x64/newrelic-20240924.so"
  if [ -e "${_PHP_EXT_DIR_84}" ] \
    && [ -e "${_NR_SO}" ] \
    && [ ! -e "${_PHP_EXT_DIR_84}/newrelic.so" ]; then
    ln -sfn ${_NR_SO} ${_PHP_EXT_DIR_84}/newrelic.so
    service php84-fpm reload
  fi

  _PHP_EXT_DIR_74="/opt/php74/lib/php/extensions/no-debug-non-zts-20190902"
  _NR_SO="/usr/lib/newrelic-php5/agent/x64/newrelic-20190902.so"
  if [ -e "${_PHP_EXT_DIR_74}" ] \
    && [ -e "${_NR_SO}" ] \
    && [ ! -e "${_PHP_EXT_DIR_74}/newrelic.so" ]; then
    ln -sfn ${_NR_SO} ${_PHP_EXT_DIR_74}/newrelic.so
    service php74-fpm reload
  fi

  _PHP_EXT_DIR_71="/opt/php71/lib/php/extensions/no-debug-non-zts-20160303"
  _NR_SO="/usr/lib/newrelic-php5/agent/x64/newrelic-20160303.so"
  if [ -e "${_PHP_EXT_DIR_71}" ] \
    && [ ! -e "${_NR_SO}" ] \
    && [ -L "${_PHP_EXT_DIR_71}/newrelic.so" ]; then
    rm -f ${_PHP_EXT_DIR_71}/newrelic.so
    service php71-fpm reload
  fi

  _PHP_EXT_DIR_70="/opt/php70/lib/php/extensions/no-debug-non-zts-20151012"
  _NR_SO="/usr/lib/newrelic-php5/agent/x64/newrelic-20151012.so"
  if [ -e "${_PHP_EXT_DIR_70}" ] \
    && [ ! -e "${_NR_SO}" ] \
    && [ -L "${_PHP_EXT_DIR_70}/newrelic.so" ]; then
    rm -f ${_PHP_EXT_DIR_70}/newrelic.so
    service php70-fpm reload
  fi

  _PHP_EXT_DIR_56="/opt/php56/lib/php/extensions/no-debug-non-zts-20131226"
  _NR_SO="/usr/lib/newrelic-php5/agent/x64/newrelic-20131226.so"
  if [ -e "${_PHP_EXT_DIR_56}" ] \
    && [ ! -e "${_NR_SO}" ] \
    && [ -L "${_PHP_EXT_DIR_56}/newrelic.so" ]; then
    rm -f ${_PHP_EXT_DIR_56}/newrelic.so
    service php56-fpm reload
  fi
}

_fix_leftovers() {
  if [ -e "/data/disk/arch/static/control" ]; then
    rm -rf /data/disk/arch/static
  fi
}

_force_rebuild() {
  if [ ! -e "${_pthLog}/forced.rebuild.glibc.txt" ]; then
    echo "_GIT_FORCE_REINSTALL=YES" >> ${_barCnf}
    echo "_NGX_FORCE_REINSTALL=YES" >> ${_barCnf}
    echo "_PHP_FORCE_REINSTALL=YES" >> ${_barCnf}
    echo "_SSH_FORCE_REINSTALL=YES" >> ${_barCnf}
    echo "_SSL_FORCE_REINSTALL=YES" >> ${_barCnf}
    rm -f ${_pthLog}/pure-ftpd-build*
    rm -f ${_pthLog}/mss-build*
    rm -f ${_pthLog}/lshell-build*
    rm -f ${_pthLog}/redis-*
    rm -f ${_pthLog}/valkey-*
    touch ${_pthLog}/forced.rebuild.glibc.txt
  fi
}

#
# Detect, remove, and report broken symlinks
_check_and_remove_broken_symlinks() {
  local _dir=$1

  # Find broken symlinks in the directory
  _broken_symlinks=$(find "${_dir}" -maxdepth 1 -type l ! -exec test -e {} \; -print)

  if [ -n "${_broken_symlinks}" ]; then
    if [ "${_DEBUG_MODE}" = "YES" ]; then
      echo "CLNP: Removing the following broken symlinks from ${_dir}:"
      echo "CLNP: ${_broken_symlinks}"
    fi

    for _symlink in ${_broken_symlinks}; do
      rm "${_symlink}"
      if [ "${_DEBUG_MODE}" = "YES" ]; then
        echo "CLNP: Removed broken symlink: ${_symlink}"
      fi
    done

    # Set the _ifAnySymlinksCleaned variable to true since we removed broken symlinks
    _ifAnySymlinksCleaned=YES
  else
    if [ "${_DEBUG_MODE}" = "YES" ]; then
      echo "CLNP: No broken symlinks found in ${_dir}"
    fi
  fi
}

#
# Check and move disallowed versions
_check_and_move() {
  local _dir=$1

  # Determine the name of the backup subdirectory based on the source directory
  local _backup_dir="${_backLegBase}$(echo "${_dir}" | tr '/' '_')"

  # Find any libcurl.so files in the directory, excluding the allowed version and those without a complete version number
  _found_versions=$(find "${_dir}" -maxdepth 1 -type f -name "libcurl.so.*" ! -name "${_allowedFile}" | grep -E "libcurl\.so\.[0-9]+\.[0-9]+\.[0-9]+$")

  if [ -n "${_found_versions}" ]; then
    if [ "${_DEBUG_MODE}" = "YES" ]; then
      echo "CLNP: Moving the following disallowed versions from ${_dir} to ${_backup_dir}:"
      echo "CLNP: ${_found_versions}"
    fi

    # Create the backup directory if it doesn't exist
    mkdir -p "${_backup_dir}"

    # Move each found version to the backup directory
    for _file in ${_found_versions}; do
      mv -f "${_file}" "${_backup_dir}/"
      if [ "${_DEBUG_MODE}" = "YES" ]; then
        echo "CLNP: Moved ${_file} to ${_backup_dir}/"
      fi
    done

    # Set the _ifAnyFilesCleaned variable to true since we moved files
    _ifAnyFilesCleaned=YES
  else
    if [ "${_DEBUG_MODE}" = "YES" ]; then
      echo "CLNP: Only the allowed version (${_allowedFile}) is present in ${_dir}"
    fi
  fi
}

_if_reinstall_curl() {
  _CURL_VRN=8.20.0
  _CURL_INSTALL_REQUIRED=NO
  if ! command -v lsb_release &> /dev/null; then
    apt-get update -qq &> /dev/null
    apt-get install lsb-release ${_aptYesUnth} -qq &> /dev/null
  fi
  _OS_CODE=$(lsb_release -ar 2>/dev/null | grep -i codename | cut -s -f2)
  [ "${_OS_CODE}" = "wheezy" ] && _CURL_VRN=7.50.1
  [ "${_OS_CODE}" = "jessie" ] && _CURL_VRN=7.71.1
  [ "${_OS_CODE}" = "stretch" ] && _CURL_VRN=8.2.1

  if [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ] \
    && [ "${_OS_CODE}" != "jessie" ] \
    && [ "${_OS_CODE}" != "stretch" ]; then

    # Target version
    _allowedFile="libcurl.so.4.8.0"

    # Directories to check
    _dirsToClean=("/usr/lib" "/usr/local/lib" "/usr/lib/x86_64-linux-gnu")

    # Backup base directory
    _backLegBase="/var/backups/legacy-libcurl-boa-${_NOW}"

    # Variable to track if any files were moved
    _ifAnyFilesCleaned=NO

    # Variable to track if any broken symlinks were found and removed
    _ifAnySymlinksCleaned=NO

    # Iterate over the directories and apply the _check_and_move function
    for _dir in "${_dirsToClean[@]}"; do
      _check_and_move "${_dir}"
    done

    # Iterate over the directories and apply the _check_and_remove_broken_symlinks function
    for _dir in "${_dirsToClean[@]}"; do
      _check_and_remove_broken_symlinks "${_dir}"
    done

    # Export the _ifAnyFilesCleaned variable for later use
    export _ifAnyFilesCleaned

    # Export the _ifAnySymlinksCleaned variable for later use
    export _ifAnySymlinksCleaned

  fi

  if [ "${_ifAnySymlinksCleaned}" = "YES" ] \
    || [ "${_ifAnyFilesCleaned}" = "YES" ]; then
    ldconfig 2> /dev/null
    _CURL_INSTALL_REQUIRED=YES
    _bkLibcurlPre="/var/backups/legacy-libcurl-pre-${_CURL_VRN}-${_NOW}"
    mkdir -p ${_bkLibcurlPre}
    mv -f /usr/lib/x86_64-linux-gnu/libcurl.so* ${_bkLibcurlPre}/ &> /dev/null
    mv -f /usr/lib/x86_64-linux-gnu/libcurl.la ${_bkLibcurlPre}/ &> /dev/null
    mv -f /usr/lib/x86_64-linux-gnu/libcurl.a ${_bkLibcurlPre}/ &> /dev/null
  fi

  _isCurl=$(curl --version 2>&1)
  if [[ ! "${_isCurl}" =~ "OpenSSL" ]] \
    || [[ "${_isCurl}" =~ "libcurl.so.4" ]] \
    || [ -z "${_isCurl}" ] \
    || [ "${_ifAnySymlinksCleaned}" = "YES" ] \
    || [ "${_ifAnyFilesCleaned}" = "YES" ] \
    || [ "${_CURL_INSTALL_REQUIRED}" = "YES" ]; then
    if [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
      echo "OOPS: cURL is broken! Re-installing.."
    fi
    if [ ! -e "/etc/apt/apt.conf.d/00sandboxoff" ] \
      && [ -e "/etc/apt/apt.conf.d" ]; then
      echo "APT::Sandbox::User \"root\";" > /etc/apt/apt.conf.d/00sandboxoff
    fi
    echo "curl install" | dpkg --set-selections 2> /dev/null
    _apt_clean_update
    # Check for libssl1.0-dev and remove conditionally
    if dpkg-query -W -f='${Status}' libssl1.0-dev 2>/dev/null | grep -q "install ok installed"; then
      apt-get remove libssl1.0-dev -y --purge --auto-remove -qq 2>/dev/null
    fi
    apt-get autoremove -y 2> /dev/null
    apt-get install libssl-dev ${_aptYesUnth} -qq 2> /dev/null
    apt-get build-dep curl ${_aptYesUnth} 2> /dev/null
    if [ ! -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
      apt-get install curl --reinstall ${_aptYesUnth} -qq 2> /dev/null
    fi
    if [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
      echo "INFO: Installing curl from sources..."
      mkdir -p /var/opt
      rm -rf /var/opt/curl*
      cd /var/opt
      wget ${_wgetGet} http://files.aegir.cc/dev/src/curl-${_CURL_VRN}.tar.gz &> /dev/null
      tar -xzf curl-${_CURL_VRN}.tar.gz &> /dev/null
      if [ -e "/root/.install.modern.openssl.cnf" ] \
        && [ -x "/usr/local/ssl3/bin/openssl" ]; then
        _SSL_BINARY=/usr/local/ssl3/bin/openssl
      else
        _SSL_BINARY=/usr/local/ssl/bin/openssl
      fi
      if [ -e "/usr/local/ssl3/lib64/libssl.so.3" ]; then
        _SSL_PATH="/usr/local/ssl3"
        _SSL_LIB_PATH="${_SSL_PATH}/lib64"
      else
        _SSL_PATH="/usr/local/ssl"
        _SSL_LIB_PATH="${_SSL_PATH}/lib"
      fi
      _PKG_CONFIG_PATH="${_SSL_LIB_PATH}/pkgconfig"

      if [ -e "${_PKG_CONFIG_PATH}" ] \
        && [ -e "/var/opt/curl-${_CURL_VRN}" ]; then
        cd /var/opt/curl-${_CURL_VRN}
        LIBS="-ldl -lpthread" PKG_CONFIG_PATH="${_PKG_CONFIG_PATH}" ./configure \
          --with-openssl \
          --with-zlib=/usr \
          --prefix=/usr/local &> /dev/null
        make -j $(nproc) --quiet &> /dev/null
        make --quiet install &> /dev/null
        ldconfig 2> /dev/null
      fi
    fi
    if [ -x "/usr/local/bin/curl" ] && [ -e "/var/aegir/.drush/hm.alias.drushrc.php" ]; then
      _CURL_ITD=$(/usr/local/bin/curl --version 2>&1 \
        | tr -d "\n" \
        | cut -d" " -f2 \
        | awk '{ print $1}' 2>&1)
      if [[ ! "${_CURL_ITD}" =~ OpenSSL ]]; then
        echo "ERRR: /usr/local/bin/curl is broken"
        echo "ERRR: Please install cURL and debug manually"
      else
        echo "GOOD: /usr/local/bin/curl works"
        echo "curl hold" | dpkg --set-selections &> /dev/null
        if [ -x "/usr/local/bin/curl" ]; then
          if [ -x "/usr/bin/curl" ] && [ ! -L "/usr/bin/curl" ]; then
            mv -f /usr/bin/curl /usr/bin/old-curl-$(date +%y%m%d-%H%M%S)
          fi
          ln -sfn /usr/local/bin/curl /usr/bin/curl
        fi
        if [ ! -e "${_SSL_PATH}/certs/ca-certificates.crt" ]; then
          cp -af /etc/ssl/certs/* ${_SSL_PATH}/certs/ &> /dev/null
        fi
        if [ -e "/usr/local/lib/libcurl.so.4.8.0" ]; then
          ln -sfn /usr/local/lib/libcurl.so.4.8.0 /usr/lib/libcurl.so
          ln -sfn /usr/local/lib/libcurl.so.4.8.0 /usr/lib/libcurl.so.4
          ln -sfn /usr/local/lib/libcurl.so.4.8.0 /usr/lib/libcurl.so.4.8.0
          ln -sfn /usr/local/lib/libcurl.so.4.8.0 /usr/lib/x86_64-linux-gnu/libcurl.so
          ln -sfn /usr/local/lib/libcurl.so.4.8.0 /usr/lib/x86_64-linux-gnu/libcurl.so.4
          ln -sfn /usr/local/lib/libcurl.so.4.8.0 /usr/lib/x86_64-linux-gnu/libcurl.so.4.8.0
        fi
        if [ -e "/usr/local/lib/libcu
Download .txt
gitextract_47j2j2qw/

├── .gitignore
├── ANNOUNCEMENT.md
├── BARRACUDA.sh.txt
├── BOA.sh.txt
├── CHANGELOG.txt
├── DIFFERENT30Y.md
├── DUALLICENSE.md
├── HTTP3.md
├── OCTOPUS.sh.txt
├── README.md
├── ROADMAP.md
├── aegir/
│   ├── conf/
│   │   ├── apparmor/
│   │   │   ├── opt.php56.bin.php
│   │   │   ├── opt.php56.sbin.php-fpm
│   │   │   ├── opt.php70.bin.php
│   │   │   ├── opt.php70.sbin.php-fpm
│   │   │   ├── opt.php71.bin.php
│   │   │   ├── opt.php71.sbin.php-fpm
│   │   │   ├── opt.php72.bin.php
│   │   │   ├── opt.php72.sbin.php-fpm
│   │   │   ├── opt.php73.bin.php
│   │   │   ├── opt.php73.sbin.php-fpm
│   │   │   ├── opt.php74.bin.php
│   │   │   ├── opt.php74.sbin.php-fpm
│   │   │   ├── opt.php80.bin.php
│   │   │   ├── opt.php80.sbin.php-fpm
│   │   │   ├── opt.php81.bin.php
│   │   │   ├── opt.php81.sbin.php-fpm
│   │   │   ├── opt.php82.bin.php
│   │   │   ├── opt.php82.sbin.php-fpm
│   │   │   ├── opt.php83.bin.php
│   │   │   ├── opt.php83.sbin.php-fpm
│   │   │   ├── opt.php84.bin.php
│   │   │   ├── opt.php84.sbin.php-fpm
│   │   │   ├── opt.php85.bin.php
│   │   │   ├── opt.php85.sbin.php-fpm
│   │   │   ├── sbin.dhclient
│   │   │   ├── usr.bin.chromium
│   │   │   ├── usr.bin.freshclam
│   │   │   ├── usr.bin.man
│   │   │   ├── usr.bin.mysecureshell
│   │   │   ├── usr.bin.mysql
│   │   │   ├── usr.bin.mysqld_safe
│   │   │   ├── usr.bin.newrelic-daemon
│   │   │   ├── usr.bin.node
│   │   │   ├── usr.bin.redis-server
│   │   │   ├── usr.bin.valkey-server
│   │   │   ├── usr.local.bin.lshell
│   │   │   ├── usr.local.bin.ssh
│   │   │   ├── usr.local.bin.wkhtmltoimage
│   │   │   ├── usr.local.bin.wkhtmltopdf
│   │   │   ├── usr.local.sbin.pure-ftpd
│   │   │   ├── usr.local.sbin.sshd
│   │   │   ├── usr.sbin.clamd
│   │   │   ├── usr.sbin.mysqld
│   │   │   ├── usr.sbin.nginx
│   │   │   ├── usr.sbin.rsyslogd
│   │   │   └── usr.sbin.unbound
│   │   ├── dns/
│   │   │   ├── unbound
│   │   │   ├── unbound-helper
│   │   │   └── unbound.conf
│   │   ├── droplet/
│   │   │   └── droplet-agent
│   │   ├── etc/
│   │   │   └── etc-ImageMagick-6-policy.xml
│   │   ├── ftpd/
│   │   │   ├── ftpusers
│   │   │   ├── pure-config.pl.txt
│   │   │   └── pure-ftpd.conf
│   │   ├── global/
│   │   │   ├── global-10.inc
│   │   │   ├── global-11.inc
│   │   │   ├── global-6.inc
│   │   │   ├── global-7.inc
│   │   │   ├── global-8.inc
│   │   │   ├── global-9.inc
│   │   │   ├── global-extra.inc
│   │   │   ├── global-front-end.inc
│   │   │   ├── global-if-redis.inc
│   │   │   ├── global-if-valkey.inc
│   │   │   ├── global-ini.inc
│   │   │   ├── global-main.inc
│   │   │   ├── global-mode.inc
│   │   │   ├── global-newrelic.inc
│   │   │   ├── global-redis.inc
│   │   │   ├── global-settings.inc
│   │   │   ├── global-valkey.inc
│   │   │   ├── global.inc
│   │   │   ├── override.global.inc
│   │   │   └── settings.global.inc
│   │   ├── ini/
│   │   │   ├── default.boa_platform_control.ini
│   │   │   ├── default.boa_site_control.ini
│   │   │   └── panels.ini
│   │   ├── network/
│   │   │   └── networking
│   │   ├── nginx/
│   │   │   ├── fastcgi_params.txt
│   │   │   ├── mime.types
│   │   │   ├── nginx
│   │   │   ├── nginx-squeeze-init
│   │   │   ├── nginx.conf
│   │   │   ├── nginx_compact_include.conf
│   │   │   ├── nginx_high_load_off.conf
│   │   │   ├── nginx_speed_purge.conf
│   │   │   ├── nginx_sql_adminer.conf
│   │   │   ├── nginx_sql_buddy.conf
│   │   │   ├── nginx_sql_cgp.conf
│   │   │   ├── nginx_sql_chive.conf
│   │   │   └── nginx_wild_ssl.conf
│   │   ├── php/
│   │   │   ├── fpm-pool-common-legacy.conf
│   │   │   ├── fpm-pool-common-modern.conf
│   │   │   ├── fpm-pool-common.conf
│   │   │   ├── fpm-pool-foo-multi.conf
│   │   │   ├── fpm-pool-foo.conf
│   │   │   ├── fpm56-pool-www.conf
│   │   │   ├── fpm70-pool-www.conf
│   │   │   ├── fpm71-pool-www.conf
│   │   │   ├── fpm72-pool-www.conf
│   │   │   ├── fpm73-pool-www.conf
│   │   │   ├── fpm74-pool-www.conf
│   │   │   ├── fpm80-pool-www.conf
│   │   │   ├── fpm81-pool-www.conf
│   │   │   ├── fpm82-pool-www.conf
│   │   │   ├── fpm83-pool-www.conf
│   │   │   ├── fpm84-pool-www.conf
│   │   │   ├── fpm85-pool-www.conf
│   │   │   ├── newrelic.ini
│   │   │   ├── php56-cli.ini
│   │   │   ├── php56-fpm
│   │   │   ├── php56-fpm.conf
│   │   │   ├── php56.ini
│   │   │   ├── php70-cli.ini
│   │   │   ├── php70-fpm
│   │   │   ├── php70-fpm.conf
│   │   │   ├── php70.ini
│   │   │   ├── php71-cli.ini
│   │   │   ├── php71-fpm
│   │   │   ├── php71-fpm.conf
│   │   │   ├── php71.ini
│   │   │   ├── php72-cli.ini
│   │   │   ├── php72-fpm
│   │   │   ├── php72-fpm.conf
│   │   │   ├── php72.ini
│   │   │   ├── php73-cli.ini
│   │   │   ├── php73-fpm
│   │   │   ├── php73-fpm.conf
│   │   │   ├── php73.ini
│   │   │   ├── php74-cli.ini
│   │   │   ├── php74-fpm
│   │   │   ├── php74-fpm.conf
│   │   │   ├── php74.ini
│   │   │   ├── php80-cli.ini
│   │   │   ├── php80-fpm
│   │   │   ├── php80-fpm.conf
│   │   │   ├── php80.ini
│   │   │   ├── php81-cli.ini
│   │   │   ├── php81-fpm
│   │   │   ├── php81-fpm.conf
│   │   │   ├── php81.ini
│   │   │   ├── php82-cli.ini
│   │   │   ├── php82-fpm
│   │   │   ├── php82-fpm.conf
│   │   │   ├── php82.ini
│   │   │   ├── php83-cli.ini
│   │   │   ├── php83-fpm
│   │   │   ├── php83-fpm.conf
│   │   │   ├── php83.ini
│   │   │   ├── php84-cli.ini
│   │   │   ├── php84-fpm
│   │   │   ├── php84-fpm.conf
│   │   │   ├── php84.ini
│   │   │   ├── php85-cli.ini
│   │   │   ├── php85-fpm
│   │   │   ├── php85-fpm.conf
│   │   │   └── php85.ini
│   │   ├── redis/
│   │   │   ├── redis-server
│   │   │   ├── redis.conf
│   │   │   ├── redis4.conf
│   │   │   ├── redis5.conf
│   │   │   ├── redis6.conf
│   │   │   └── redis7.conf
│   │   ├── solr9/
│   │   │   ├── analysis-extras.mod
│   │   │   ├── analytics.mod
│   │   │   ├── clustering.mod
│   │   │   ├── cross-dc.mod
│   │   │   ├── extraction.mod
│   │   │   ├── gcs-repository.mod
│   │   │   ├── hadoop-auth.mod
│   │   │   ├── hdfs.mod
│   │   │   ├── jaegertracer-configurator.mod
│   │   │   ├── jwt-auth.mod
│   │   │   ├── langid.mod
│   │   │   ├── llm.mod
│   │   │   ├── ltr.mod
│   │   │   ├── opentelemetry.mod
│   │   │   ├── s3-repository.mod
│   │   │   ├── scripting.mod
│   │   │   └── sql.mod
│   │   ├── tpl/
│   │   │   ├── migration.html
│   │   │   ├── robots.txt
│   │   │   ├── setupmail.txt
│   │   │   ├── uc.html
│   │   │   └── upgrademail.txt
│   │   ├── valkey/
│   │   │   ├── valkey-server
│   │   │   ├── valkey7.conf
│   │   │   ├── valkey8.conf
│   │   │   └── valkey9.conf
│   │   ├── var/
│   │   │   ├── boa.bashrc.txt
│   │   │   ├── clean-boa-env
│   │   │   ├── crossdomain.xml
│   │   │   ├── csf.conf
│   │   │   ├── galera.cnf
│   │   │   ├── get.htaccess.txt
│   │   │   ├── logrotate.d.rsyslog.conf
│   │   │   ├── my.cnf.txt
│   │   │   ├── mysql
│   │   │   ├── mysql-notices.conf
│   │   │   ├── named.conf.options
│   │   │   ├── rsyslog.conf
│   │   │   ├── sftp_config
│   │   │   ├── ssh_config
│   │   │   ├── sshd_config
│   │   │   └── sysctl.conf
│   │   └── version/
│   │       ├── barracuda-release.txt
│   │       ├── barracuda-version.txt
│   │       ├── octopus-release.txt
│   │       ├── octopus-version.txt
│   │       ├── release.txt
│   │       └── version.txt
│   ├── helpers/
│   │   ├── Gemfile.txt
│   │   ├── apt-list-debian.txt
│   │   ├── apt.conf.noi.dist
│   │   ├── apt.conf.noi.nrml
│   │   ├── apt.conf.noninteractive
│   │   ├── cf-simple-hook.sh
│   │   ├── challenge-dns-email-hook.sh
│   │   ├── dehydrated
│   │   ├── dump_cdorked_config.c
│   │   ├── fix-fstab-to-uuid.sh
│   │   ├── hosting_cron.sql
│   │   ├── le-hook.sh
│   │   ├── make_client.php.txt
│   │   ├── make_client_3.php.txt
│   │   ├── make_home.php.txt
│   │   ├── make_platform.php.txt
│   │   ├── make_platform_3.php.txt
│   │   ├── mysql_root_pass_reset.sh
│   │   ├── mysqltuner5
│   │   ├── mysqltuner8
│   │   ├── rtoc.php.txt
│   │   ├── spinner
│   │   ├── systemtime
│   │   └── websh.sh.txt
│   ├── makefiles/
│   │   ├── civicrm-4.5-d6.make
│   │   ├── civicrm-4.5-d7.make
│   │   ├── civicrm-4.6-d6.make
│   │   ├── civicrm-4.6-d7.make
│   │   ├── civicrm-4.7-d6.make
│   │   ├── civicrm-4.7-d7.make
│   │   ├── civicrm-5.0-d6.make
│   │   ├── civicrm-5.0-d7.make
│   │   ├── civicrm-5.1-d7.make
│   │   ├── civicrm-5.2-d7.make
│   │   ├── civicrm-5.3-d7.make
│   │   ├── civicrm-5.35-d7.make
│   │   └── civicrm-5.9-d7.make
│   ├── patches/
│   │   ├── 0001-Print-site_footer-if-defined.patch
│   │   ├── 2106995-fatal-error-non-object-1.patch
│   │   ├── 6-core/
│   │   │   ├── SA-CORE-2018-002-D6.patch
│   │   │   ├── SA-CORE-2018-004-D6.patch
│   │   │   └── patch_commit_7a847db99f80.patch
│   │   ├── 7-core/
│   │   │   ├── 3143016-83-D7.patch
│   │   │   ├── SA-CORE-2014-005-D7.patch
│   │   │   ├── SA-CORE-2018-002-D7.patch
│   │   │   ├── SA-CORE-2018-004-D7.patch
│   │   │   ├── SA-CORE-2018-006-D7.patch
│   │   │   ├── drupal-2656548-21-php7.patch
│   │   │   └── patch_commit_b8a8a84ea9b3.patch
│   │   ├── 8-core/
│   │   │   ├── 0001-Symlink-core-support-test.patch
│   │   │   ├── SA-CORE-2018-002-D8.patch
│   │   │   ├── SA-CORE-2018-004-D8.patch
│   │   │   └── SA-CORE-2018-006-D8.patch
│   │   ├── 992540-3-reset_flood_limit_on_password_reset-drush.patch
│   │   ├── MailManagerReplacement.php.patch
│   │   ├── PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch
│   │   ├── activity.patch
│   │   ├── apps_msg.patch
│   │   ├── bug62886.patch
│   │   ├── civicrm.drush.inc.patch.txt
│   │   ├── civicrm_engage.install
│   │   ├── commerce_kickstart.patch
│   │   ├── commons-1045778-fix-aegir-installs.patch
│   │   ├── commons-1060250-aegir-infinite-loop.patch
│   │   ├── commons_chicken_egg.patch
│   │   ├── disable_SSLv2_for_openssl_1_0_0.patch
│   │   ├── drupal-eleven-aegir-console-02.patch
│   │   ├── drupal-eleven-aegir-core-01.patch
│   │   ├── drupal-eleven-aegir-validator-03.patch
│   │   ├── drupal-ten-aegir-console-02.patch
│   │   ├── drupal-ten-aegir-core-01.patch
│   │   ├── drush-remote_make_files.patch
│   │   ├── drush_make-drush-4.x-fix-do7-compatibility.patch
│   │   ├── drush_make.drush.inc.patch
│   │   ├── features-1265168-19-roles.patch
│   │   ├── field_info_collate_fields-1400256-25.patch
│   │   ├── fpm_main.c.patch
│   │   ├── freetype.patch
│   │   ├── hosting_advanced_cron.patch
│   │   ├── hosting_cron.module
│   │   ├── hosting_cron_queue-reliability.patch
│   │   ├── hosting_le_vhost.drush.inc
│   │   ├── imagecache-1243258-5.patch
│   │   ├── imagefield_crop.patch
│   │   ├── julio_profile.patch
│   │   ├── my_config.h.patch
│   │   ├── mysql.provision.patch
│   │   ├── nik.patch
│   │   ├── object_conversion_menu_router_build-972536-1.patch
│   │   ├── octopus_video.patch
│   │   ├── og_update_6205_commons_fix.patch
│   │   ├── openacademy-search-off.patch
│   │   ├── openacademy.patch
│   │   ├── openaid-tpl.patch
│   │   ├── openenterprise.patch
│   │   ├── openoutreach.patch
│   │   ├── openpublic.patch
│   │   ├── openscholar.profile.patch
│   │   ├── openscholar_projects.profile.patch
│   │   ├── panopoly-search-off.patch
│   │   ├── panopoly-search-redis.patch
│   │   ├── patch_commit_6fabd31b0f81.patch
│   │   ├── patch_commit_fa47bad85589.patch
│   │   ├── php-8.1-openssl3.patch
│   │   ├── provision/
│   │   │   └── patch_commit_e4abc685f9b4.patch
│   │   ├── provision_hosting_le.drush.inc
│   │   ├── remove_usr1_usr2_fpm_unix.patch
│   │   ├── restaurant_demo.patch
│   │   ├── singular.mft.patch
│   │   ├── singular.patch
│   │   ├── skwashd.commons.patch
│   │   ├── taxonomy-6.20.patch
│   │   ├── taxonomy-6.26.patch
│   │   ├── taxonomy-7.12.patch
│   │   ├── taxonomy-7.7.patch
│   │   ├── ubercart-1167276-reroll.patch
│   │   ├── user.drush.inc.patch
│   │   ├── videola.patch
│   │   ├── views-853864_2.patch
│   │   ├── views-exposed-sorts-2037469-1.patch
│   │   ├── views-revert-broken-filter-or-groups-1766338-7.patch
│   │   └── views-unpack_options-cache-6.2-51.patch
│   ├── scripts/
│   │   ├── AegirSetupA.sh.txt
│   │   ├── AegirSetupB.sh.txt
│   │   ├── AegirSetupC.sh.txt
│   │   ├── AegirSetupM.sh.txt
│   │   ├── AegirUpgrade.sh.txt
│   │   └── run-xdrago
│   └── tools/
│       ├── BOND.sh.txt
│       ├── backup/
│       │   └── run/
│       │       ├── create_config_readme.sh
│       │       ├── create_credentials_templates.sh
│       │       ├── create_cron_entries.sh
│       │       ├── create_global_paths_config.sh
│       │       ├── create_readme.sh
│       │       ├── create_user_paths_config.sh
│       │       ├── duplicity_backup.sh
│       │       ├── duplicity_bundle_installer.sh
│       │       └── install_dependencies.sh
│       ├── bin/
│       │   ├── aptcleanup
│       │   ├── aptfast
│       │   ├── autobeowulf
│       │   ├── autochimaera
│       │   ├── autodaedalus
│       │   ├── autoexcalibur
│       │   ├── autoinit
│       │   ├── automini
│       │   ├── autosymlink
│       │   ├── autoupboa
│       │   ├── backboa
│       │   ├── backchain
│       │   ├── barracuda
│       │   ├── boa
│       │   ├── cluster
│       │   ├── codebasecheck
│       │   ├── copydbackup
│       │   ├── dcysetup
│       │   ├── dhcpfix
│       │   ├── duobackboa
│       │   ├── fancynow
│       │   ├── ffdevuan
│       │   ├── ffmirror
│       │   ├── fix-drupal-platform-ownership.sh
│       │   ├── fix-drupal-platform-permissions.sh
│       │   ├── fix-drupal-site-ownership.sh
│       │   ├── fix-drupal-site-permissions.sh
│       │   ├── fixmounts
│       │   ├── fixrepo
│       │   ├── killer
│       │   ├── loadguard
│       │   ├── lock-local-drush-permissions.sh
│       │   ├── lock.inc
│       │   ├── memorytuner
│       │   ├── mergecsf
│       │   ├── multiback
│       │   ├── mybackup
│       │   ├── mycnfup
│       │   ├── octopus
│       │   ├── perftest
│       │   ├── proxysql_galera_checker
│       │   ├── proxysql_node_monitor
│       │   ├── randpass
│       │   ├── renameaegirhost
│       │   ├── screenfetch
│       │   ├── setprio
│       │   ├── showdepend
│       │   ├── smtpgapps
│       │   ├── sqlclean
│       │   ├── sqlmagic
│       │   ├── syncpass
│       │   ├── synproxy
│       │   ├── synproxy_hook_fix
│       │   ├── synproxy_monitor
│       │   ├── synproxy_reassert
│       │   ├── synproxy_rollback
│       │   ├── synproxy_snapshot
│       │   ├── synproxy_status
│       │   ├── thinkdifferent
│       │   ├── updatesymlinks
│       │   ├── verifyvhostsdns
│       │   ├── vhostcheck
│       │   ├── vmnetfix
│       │   ├── weblogx
│       │   ├── webserver
│       │   ├── websh
│       │   ├── xboa
│       │   └── xcopy
│       ├── host/
│       │   ├── host-fire.sh
│       │   └── host-water.sh
│       └── system/
│           ├── checksql.pl
│           ├── clear.sh
│           ├── conf/
│           │   ├── SA-CORE-2014-005-D7.patch
│           │   ├── control-readme.txt
│           │   ├── https_proxy_le.conf
│           │   ├── lshell.conf
│           │   ├── pln_proxy.conf
│           │   ├── proxy.conf
│           │   ├── solr/
│           │   │   ├── apachesolr/
│           │   │   │   ├── solr4_drupal6/
│           │   │   │   │   ├── elevate.xml
│           │   │   │   │   ├── mapping-ISOLatin1Accent.txt
│           │   │   │   │   ├── protwords.txt
│           │   │   │   │   ├── schema.xml
│           │   │   │   │   ├── schema_extra_fields.xml
│           │   │   │   │   ├── schema_extra_types.xml
│           │   │   │   │   ├── solrconfig.xml
│           │   │   │   │   ├── solrconfig_extra.xml
│           │   │   │   │   ├── solrcore.properties
│           │   │   │   │   ├── stopwords.txt
│           │   │   │   │   └── synonyms.txt
│           │   │   │   ├── solr4_drupal7/
│           │   │   │   │   ├── elevate.xml
│           │   │   │   │   ├── mapping-ISOLatin1Accent.txt
│           │   │   │   │   ├── protwords.txt
│           │   │   │   │   ├── schema.xml
│           │   │   │   │   ├── schema_extra_fields.xml
│           │   │   │   │   ├── schema_extra_types.xml
│           │   │   │   │   ├── solrconfig.xml
│           │   │   │   │   ├── solrconfig_extra.xml
│           │   │   │   │   ├── solrcore.properties
│           │   │   │   │   ├── stopwords.txt
│           │   │   │   │   └── synonyms.txt
│           │   │   │   └── solr7_drupal7/
│           │   │   │       ├── elevate.xml
│           │   │   │       ├── mapping-ISOLatin1Accent.txt
│           │   │   │       ├── protwords.txt
│           │   │   │       ├── schema.xml
│           │   │   │       ├── schema_extra_fields.xml
│           │   │   │       ├── schema_extra_types.xml
│           │   │   │       ├── solrconfig.xml
│           │   │   │       ├── solrconfig_extra.xml
│           │   │   │       ├── solrcore.properties
│           │   │   │       ├── stopwords.txt
│           │   │   │       └── synonyms.txt
│           │   │   └── search_api_solr/
│           │   │       ├── solr4_drupal7/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── mapping-ISOLatin1Accent.txt
│           │   │       │   ├── protwords.txt
│           │   │       │   ├── schema.xml
│           │   │       │   ├── schema_extra_fields.xml
│           │   │       │   ├── schema_extra_types.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   ├── solrconfig_extra.xml
│           │   │       │   ├── solrcore.properties
│           │   │       │   ├── stopwords.txt
│           │   │       │   └── synonyms.txt
│           │   │       ├── solr7_drupal10/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── schema.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   └── solrcore.properties
│           │   │       ├── solr7_drupal7/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── mapping-ISOLatin1Accent.txt
│           │   │       │   ├── protwords.txt
│           │   │       │   ├── schema.xml
│           │   │       │   ├── schema_extra_fields.xml
│           │   │       │   ├── schema_extra_types.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   ├── solrconfig_extra.xml
│           │   │       │   ├── solrcore.properties
│           │   │       │   ├── stopwords.txt
│           │   │       │   └── synonyms.txt
│           │   │       ├── solr7_drupal8/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── schema.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   └── solrcore.properties
│           │   │       ├── solr7_drupal9/
│           │   │       │   ├── elevate.xml
│           │   │       │   ├── schema.xml
│           │   │       │   ├── solrconfig.xml
│           │   │       │   └── solrcore.properties
│           │   │       └── solr9_drupal10/
│           │   │           ├── elevate.xml
│           │   │           ├── schema.xml
│           │   │           ├── solrconfig.xml
│           │   │           └── solrcore.properties
│           │   └── ssl_proxy.conf
│           ├── cron/
│           │   └── crontabs/
│           │       └── root
│           ├── daily.sh
│           ├── graceful.sh
│           ├── guest-fire.sh
│           ├── guest-water.sh
│           ├── ip_access.sh
│           ├── log/
│           │   └── EMPTY.txt
│           ├── manage_ltd_users.sh
│           ├── manage_solr_config.sh
│           ├── minute.sh
│           ├── monitor/
│           │   └── check/
│           │       ├── escapecheck.pl
│           │       ├── escapecheck.sh
│           │       ├── hackcheck.pl
│           │       ├── hackcheck.sh
│           │       ├── hackftp.pl
│           │       ├── hackftp.sh
│           │       ├── java.sh
│           │       ├── mysql.sh
│           │       ├── nginx.sh
│           │       ├── nginx_guard.sh
│           │       ├── php.sh
│           │       ├── redis.sh
│           │       ├── scan_nginx.sh
│           │       ├── segfault_alert.pl
│           │       ├── sqlcheck.pl
│           │       ├── system.sh
│           │       ├── unbound.sh
│           │       └── valkey.sh
│           ├── move_sql.sh
│           ├── mysql_backup.sh
│           ├── mysql_cleanup.sh
│           ├── mysql_cluster_backup.sh
│           ├── mysql_repair.sh
│           ├── proc_num_ctrl.pl
│           ├── purge_binlogs.sh
│           ├── runner.sh
│           ├── second.sh
│           └── usage.sh
├── docs/
│   ├── BACKUPS.md
│   ├── BACKUP_REGIONS.md
│   ├── BACKUP_RETENTION.md
│   ├── BACKUP_ROOT.md
│   ├── BACKUP_USER.md
│   ├── BLOWFISH.md
│   ├── BRANCHES.md
│   ├── BUILDTESTS.md
│   ├── CAVEATS.md
│   ├── CLUSTER.md
│   ├── COMPOSER.md
│   ├── CONTRIBUTING.md
│   ├── DEVELOPMENT.md
│   ├── DISK_RESIZE.md
│   ├── DRUPALGEDDON.md
│   ├── DRUSH-CLI.md
│   ├── FAQ.md
│   ├── FASTTRACK.md
│   ├── FIXME.md
│   ├── GEM.md
│   ├── INSTALL.md
│   ├── IPv6.md
│   ├── MAJORUPGRADE.md
│   ├── MIGRATE.md
│   ├── MODULES.md
│   ├── MYQUICK.md
│   ├── NEWRELIC.md
│   ├── NOTES.md
│   ├── PHP-FPM.md
│   ├── PLATFORMS.md
│   ├── PROVIDES.md
│   ├── REMOTE.md
│   ├── REWRITES.md
│   ├── SECURITY.md
│   ├── SELFUPGRADE.md
│   ├── SKYNET.md
│   ├── SMTP_SSL_DEBUG.md
│   ├── SOLR.md
│   ├── SOLR_OPTIMIZE.md
│   ├── SSL.md
│   ├── UPGRADE.md
│   ├── cnf/
│   │   ├── barracuda.cnf
│   │   └── octopus.cnf
│   ├── ctrl/
│   │   ├── platform.ctrl
│   │   ├── site.ctrl
│   │   └── system.ctrl
│   └── ini/
│       ├── platform/
│       │   └── INI.md
│       └── site/
│           └── INI.md
├── lib/
│   ├── functions/
│   │   ├── dns.sh.inc
│   │   ├── firewall.sh.inc
│   │   ├── helper.sh.inc
│   │   ├── hotfix.sh.inc
│   │   ├── master.sh.inc
│   │   ├── nginx.sh.inc
│   │   ├── php.sh.inc
│   │   ├── redis.sh.inc
│   │   ├── satellite.sh.inc
│   │   ├── solr.sh.inc
│   │   ├── sql.sh.inc
│   │   ├── system.sh.inc
│   │   ├── valkey.sh.inc
│   │   └── xtra.sh.inc
│   └── settings/
│       ├── barracuda.sh.cnf
│       └── octopus.sh.cnf
└── releases/
    ├── BOA-5.6.0-PRO.md
    ├── BOA-5.7.11-PRO.md
    ├── BOA-5.8.5-PRO.md
    └── BOA-5.9.1-PRO.md
Download .txt
SYMBOL INDEX (2 symbols across 2 files)

FILE: aegir/helpers/dump_cdorked_config.c
  function main (line 20) | int main (int argc, char *argv[]) {

FILE: aegir/helpers/hosting_cron.sql
  type `hosting_cron` (line 1) | CREATE TABLE IF NOT EXISTS `hosting_cron` (
Copy disabled (too large) Download .json
Condensed preview — 616 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (10,607K chars).
[
  {
    "path": ".gitignore",
    "chars": 35,
    "preview": "# Ignore paths from OS X\n.DS_Store\n"
  },
  {
    "path": "ANNOUNCEMENT.md",
    "chars": 1645,
    "preview": "# The Future of Ægir 3 is Bryght!\n*Announcement from Omega8.cc*\n\nOmega8.cc is now the lead developer team for Ægir 3 run"
  },
  {
    "path": "BARRACUDA.sh.txt",
    "chars": 13871,
    "preview": "#!/bin/bash\n\n\n###----------------------------------------###\n###\n###  Barracuda Ægir Installer\n###\n###  Copyright (C) 20"
  },
  {
    "path": "BOA.sh.txt",
    "chars": 220225,
    "preview": "#!/bin/bash\n\n\n###----------------------------------------###\n###\n###  BOA Meta Installer\n###\n###  Copyright (C) 2009-202"
  },
  {
    "path": "CHANGELOG.txt",
    "chars": 463527,
    "preview": "\n###\n### Stable BOA-5.9.1-pro/lts - HTTP/3 Edition\n### Date: Sun Feb 8 10:02:06 PM NZDT 2026 in Auckland\n### Welcome Fas"
  },
  {
    "path": "DIFFERENT30Y.md",
    "chars": 5334,
    "preview": "# 30 Years of Heritage\n\nWe are unique within the hosting industry for many important reasons. Our 15 years of Ægir-based"
  },
  {
    "path": "DUALLICENSE.md",
    "chars": 5187,
    "preview": "# Dual License and BOA Branches Explained\n\n**BOA** remains a **Free/Libre Open Source Project**. While all of **BOA** co"
  },
  {
    "path": "HTTP3.md",
    "chars": 4023,
    "preview": "# Strap in, your sites are getting an F1 engine\n\nWe’re rolling out a meaningful upgrade across BOA/Omega8.cc nodes: HTTP"
  },
  {
    "path": "OCTOPUS.sh.txt",
    "chars": 8348,
    "preview": "#!/bin/bash\n\n\n###----------------------------------------###\n###\n###  Octopus Ægir Installer\n###\n###  Copyright (C) 2009"
  },
  {
    "path": "README.md",
    "chars": 10968,
    "preview": "# Welcome to BOA!\n\nBOA stands for Barracuda, Octopus, and Ægir—a high-performance LEMP stack supporting Drupal from Pres"
  },
  {
    "path": "ROADMAP.md",
    "chars": 4313,
    "preview": "# BOA Roadmap & Progress\n\nDocumenting ongoing, upcoming and completed tasks. Some tasks are relatively simple, while oth"
  },
  {
    "path": "aegir/conf/apparmor/opt.php56.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php56) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php56.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php56) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php70.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php70) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php70.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php70) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php71.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php71) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php71.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php71) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php72.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php72) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php72.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php72) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php73.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php73) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php73.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php73) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php74.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php74) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php74.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php74) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php80.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php80) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php80.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php80) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php81.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php81) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php81.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php81) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php82.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php82) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php82.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php82) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php83.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php83) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php83.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php83) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php84.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php84) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php84.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php84) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/opt.php85.bin.php",
    "chars": 9275,
    "preview": "# AppArmor profile for PHP-CLI\n# This profile restricts PHP-CLI (php85) to essential operations only.\n\n#include <tunable"
  },
  {
    "path": "aegir/conf/apparmor/opt.php85.sbin.php-fpm",
    "chars": 3997,
    "preview": "# AppArmor profile for PHP-FPM\n# This profile restricts the PHP-FPM (php85) to essential operations only.\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/sbin.dhclient",
    "chars": 3485,
    "preview": "# AppArmor profile for DHCP dhclient\n# This profile restricts DHCP dhclient (dhclient) to essential operations only.\n\n#i"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.chromium",
    "chars": 1508,
    "preview": "# File: /etc/apparmor.d/usr.bin.chromium\n\n#include <tunables/global>\n\n/usr/bin/chromium flags=(complain) {\n\n  # Include "
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.freshclam",
    "chars": 2344,
    "preview": "# AppArmor profile for Freshclam service\n# This profile restricts Freshclam service (freshclam) to essential operations "
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.man",
    "chars": 2783,
    "preview": "# AppArmor profile for Man service\n# This profile restricts Man service (man) to essential operations only.\n\n#include <t"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.mysecureshell",
    "chars": 4343,
    "preview": "# AppArmor profile for MySecureShell\n# This profile restricts MySecureShell (mysecureshell) to essential operations only"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.mysql",
    "chars": 2414,
    "preview": "# AppArmor profile for MySQL client\n# This profile restricts MySQL client (mysql) to essential operations only.\n\n#includ"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.mysqld_safe",
    "chars": 2268,
    "preview": "# AppArmor profile for MySQLd starter\n# This profile restricts MySQLd starter (mysqld_safe) to essential operations only"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.newrelic-daemon",
    "chars": 1694,
    "preview": "# AppArmor profile for New Relic\n# This profile restricts the New Relic (newrelic-daemon) to essential operations only.\n"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.node",
    "chars": 2351,
    "preview": "# AppArmor profile for Node/NPM\n# This profile restricts Limited Shell (lshell) to essential operations only.\n\n#include "
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.redis-server",
    "chars": 1528,
    "preview": "# AppArmor profile for Redis server\n# This profile restricts the Redis server (redis-server) to essential operations onl"
  },
  {
    "path": "aegir/conf/apparmor/usr.bin.valkey-server",
    "chars": 1553,
    "preview": "# AppArmor profile for Valkey server\n# This profile restricts the Valkey server (valkey-server) to essential operations "
  },
  {
    "path": "aegir/conf/apparmor/usr.local.bin.lshell",
    "chars": 4335,
    "preview": "# AppArmor profile for Limited Shell\n# This profile restricts Limited Shell (lshell) to essential operations only.\n\n#inc"
  },
  {
    "path": "aegir/conf/apparmor/usr.local.bin.ssh",
    "chars": 1815,
    "preview": "# AppArmor profile for SSH client\n# This profile restricts the SSH client (ssh) to essential operations only.\n\n#include "
  },
  {
    "path": "aegir/conf/apparmor/usr.local.bin.wkhtmltoimage",
    "chars": 1345,
    "preview": "# File: /etc/apparmor.d/usr.local.bin.wkhtmltoimage\n# Template from https://wkhtmltopdf.org/apparmor.html\n\n#include <tun"
  },
  {
    "path": "aegir/conf/apparmor/usr.local.bin.wkhtmltopdf",
    "chars": 1337,
    "preview": "# File: /etc/apparmor.d/usr.local.bin.wkhtmltopdf\n# Template from https://wkhtmltopdf.org/apparmor.html\n\n#include <tunab"
  },
  {
    "path": "aegir/conf/apparmor/usr.local.sbin.pure-ftpd",
    "chars": 2638,
    "preview": "# AppArmor profile for Pure-FTPd server\n# This profile restricts Pure-FTPd server (pure-ftpd) to essential operations on"
  },
  {
    "path": "aegir/conf/apparmor/usr.local.sbin.sshd",
    "chars": 5552,
    "preview": "# AppArmor profile for SSHd daemon\n# This profile restricts the SSHd daemon (sshd) to essential operations only.\n\n#inclu"
  },
  {
    "path": "aegir/conf/apparmor/usr.sbin.clamd",
    "chars": 2300,
    "preview": "# AppArmor profile for Clamd service\n# This profile restricts Clamd service (clamd) to essential operations only.\n\n#incl"
  },
  {
    "path": "aegir/conf/apparmor/usr.sbin.mysqld",
    "chars": 2353,
    "preview": "# AppArmor profile for MySQLd server\n# This profile restricts MySQLd server (mysqld) to essential operations only.\n\n#inc"
  },
  {
    "path": "aegir/conf/apparmor/usr.sbin.nginx",
    "chars": 2480,
    "preview": "# AppArmor profile for Nginx server\n# This profile restricts Nginx server (nginx) to essential operations only.\n\n#includ"
  },
  {
    "path": "aegir/conf/apparmor/usr.sbin.rsyslogd",
    "chars": 1756,
    "preview": "# AppArmor profile for Rsyslogd service\n# This profile restricts Rsyslogd service (rsyslogd) to essential operations onl"
  },
  {
    "path": "aegir/conf/apparmor/usr.sbin.unbound",
    "chars": 1973,
    "preview": "# AppArmor profile for Unbound server\n# This profile restricts Unbound server (unbound) to essential operations only.\n\n#"
  },
  {
    "path": "aegir/conf/dns/unbound",
    "chars": 3052,
    "preview": "#!/bin/dash\n\n### BEGIN INIT INFO\n# Provides:          unbound\n# Required-Start:    $network $remote_fs $syslog\n# Require"
  },
  {
    "path": "aegir/conf/dns/unbound-helper",
    "chars": 3710,
    "preview": "#!/bin/dash -e\n\nUNBOUND_CONF=\"/etc/unbound/unbound.conf\"\nUNBOUND_BASE_DIR=\"${UNBOUND_CONF%/*}\"\nCHROOT_DIR=\"$(unbound-che"
  },
  {
    "path": "aegir/conf/dns/unbound.conf",
    "chars": 2160,
    "preview": "###\n### /etc/unbound/unbound.conf.d/unbound.conf\n###\nserver:\n    # Log\n    use-syslog: no\n    logfile: \"/var/log/unbound"
  },
  {
    "path": "aegir/conf/droplet/droplet-agent",
    "chars": 1760,
    "preview": "#!/usr/bin/env bash\n### BEGIN INIT INFO\n# Provides:          droplet-agent\n# Required-Start:    $remote_fs $syslog $netw"
  },
  {
    "path": "aegir/conf/etc/etc-ImageMagick-6-policy.xml",
    "chars": 4702,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE policymap [\n  <!ELEMENT policymap (policy)*>\n  <!ATTLIST policymap xmln"
  },
  {
    "path": "aegir/conf/ftpd/ftpusers",
    "chars": 60,
    "preview": "root\ndaemon\nbin\nsys\nsync\ngames\nman\nlp\nmail\nnews\nuucp\nnobody\n"
  },
  {
    "path": "aegir/conf/ftpd/pure-config.pl.txt",
    "chars": 3304,
    "preview": "#! /usr/bin/perl\n\n# (C) 2001-2009 Aristotle Pagaltzis\n# derived from code (C) 2001-2002 Frank Denis and Matthias Andree\n"
  },
  {
    "path": "aegir/conf/ftpd/pure-ftpd.conf",
    "chars": 11365,
    "preview": "\n############################################################\n#                                                         "
  },
  {
    "path": "aegir/conf/global/global-10.inc",
    "chars": 1891,
    "preview": "<?php # global settings.php\n\n\n/**\n * Include ini\n */\nif (is_readable('/data/conf/global/global-ini.inc')) {\n  include_on"
  },
  {
    "path": "aegir/conf/global/global-11.inc",
    "chars": 1891,
    "preview": "<?php # global settings.php\n\n\n/**\n * Include ini\n */\nif (is_readable('/data/conf/global/global-ini.inc')) {\n  include_on"
  },
  {
    "path": "aegir/conf/global/global-6.inc",
    "chars": 1890,
    "preview": "<?php # global settings.php\n\n\n/**\n * Include ini\n */\nif (is_readable('/data/conf/global/global-ini.inc')) {\n  include_on"
  },
  {
    "path": "aegir/conf/global/global-7.inc",
    "chars": 1890,
    "preview": "<?php # global settings.php\n\n\n/**\n * Include ini\n */\nif (is_readable('/data/conf/global/global-ini.inc')) {\n  include_on"
  },
  {
    "path": "aegir/conf/global/global-8.inc",
    "chars": 1890,
    "preview": "<?php # global settings.php\n\n\n/**\n * Include ini\n */\nif (is_readable('/data/conf/global/global-ini.inc')) {\n  include_on"
  },
  {
    "path": "aegir/conf/global/global-9.inc",
    "chars": 1890,
    "preview": "<?php # global settings.php\n\n\n/**\n * Include ini\n */\nif (is_readable('/data/conf/global/global-ini.inc')) {\n  include_on"
  },
  {
    "path": "aegir/conf/global/global-extra.inc",
    "chars": 4072,
    "preview": "<?php # global settings.php\n\n/**\n * Activate mail_safety for sites-cron-off on the fly\n */\nif (is_readable('/data/conf/s"
  },
  {
    "path": "aegir/conf/global/global-front-end.inc",
    "chars": 9673,
    "preview": "<?php # global settings.php\n\n\n/**\n * More logic for the front-end only\n */\nif (!$is_backend && isset($_SERVER['HTTP_HOST"
  },
  {
    "path": "aegir/conf/global/global-if-redis.inc",
    "chars": 5766,
    "preview": "<?php # global settings.php\n\n\n/* ---------------- Feature switch -------------------------------------- */\nif ($drupal_c"
  },
  {
    "path": "aegir/conf/global/global-if-valkey.inc",
    "chars": 5766,
    "preview": "<?php # global settings.php\n\n\n/* ---------------- Feature switch -------------------------------------- */\nif ($drupal_c"
  },
  {
    "path": "aegir/conf/global/global-ini.inc",
    "chars": 2375,
    "preview": "<?php # global settings.php\n\n\n/**\n * Core versions init\n */\n$backdropcms   = FALSE;\n$drupal_core   = FALSE;\n$drupal_id  "
  },
  {
    "path": "aegir/conf/global/global-main.inc",
    "chars": 11595,
    "preview": "<?php # global settings.php\n\n\n/**\n * Bots protection for all tmp/dev sites - works also for aliases\n */\nif ($is_bot) {\n "
  },
  {
    "path": "aegir/conf/global/global-mode.inc",
    "chars": 3077,
    "preview": "<?php # global settings.php\n\n\n/**\n * Bots detection\n */\nif (isset($_SERVER['HTTP_USER_AGENT']) &&\n    preg_match(\"/(?:cr"
  },
  {
    "path": "aegir/conf/global/global-newrelic.inc",
    "chars": 3044,
    "preview": "<?php # global settings.php\n\n/**\n * New Relic Integration for Drupal with Drush Compatibility (8, 12, 13)\n *\n * Supports"
  },
  {
    "path": "aegir/conf/global/global-redis.inc",
    "chars": 17590,
    "preview": "<?php # global settings.php\n\n\n/**\n * Use Redis caching and lock support only for d6 and d7 profiles\n */\nif ($valkey_up &"
  },
  {
    "path": "aegir/conf/global/global-settings.inc",
    "chars": 14427,
    "preview": "<?php # global settings.php\n\n\n/**\n * Forced default settings\n */\nif ($drupal_core >= 11) {\n  // Drupal core Package Mana"
  },
  {
    "path": "aegir/conf/global/global-valkey.inc",
    "chars": 17620,
    "preview": "<?php # global settings.php\n\n\n/**\n * Use Valkey caching and lock support only for d6 and d7 profiles\n */\nif ($valkey_up "
  },
  {
    "path": "aegir/conf/global/global.inc",
    "chars": 70334,
    "preview": "<?php # global settings.php\n\n\n/**\n * Core versions init\n */\n$backdropcms   = FALSE;\n$drupal_core   = FALSE;\n$drupal_id  "
  },
  {
    "path": "aegir/conf/global/override.global.inc",
    "chars": 3218,
    "preview": "<?php # override global settings.php\n\n// This file should be created as /data/conf/override.global.inc.\n\n// Kind of core"
  },
  {
    "path": "aegir/conf/global/settings.global.inc",
    "chars": 203,
    "preview": "<?php # define custom global settings\n\n// This file should be created as /data/conf/settings.global.inc.\n\n// Settings us"
  },
  {
    "path": "aegir/conf/ini/default.boa_platform_control.ini",
    "chars": 24544,
    "preview": "\n;; ## INI (platform level) located in sites/all/modules/\n\n;;\n;;  DO NOT EDIT THIS FILE, it is just a TEMPLATE with docu"
  },
  {
    "path": "aegir/conf/ini/default.boa_site_control.ini",
    "chars": 22026,
    "preview": "\n;; ## INI (site level) located in sites/foo.com/modules/\n\n;;\n;;  DO NOT EDIT THIS FILE, it is just a TEMPLATE with docu"
  },
  {
    "path": "aegir/conf/ini/panels.ini",
    "chars": 123,
    "preview": "[New Left Panel]\ndisplay=listing\nsort_order=mtime\nreverse=1\n\n[New Right Panel]\ndisplay=listing\nsort_order=mtime\nreverse="
  },
  {
    "path": "aegir/conf/network/networking",
    "chars": 4533,
    "preview": "#!/bin/dash -e\n### BEGIN INIT INFO\n# Provides:          networking ifupdown\n# Required-Start:    mountkernfs $local_fs u"
  },
  {
    "path": "aegir/conf/nginx/fastcgi_params.txt",
    "chars": 1463,
    "preview": "fastcgi_param   QUERY_STRING            $query_string;\nfastcgi_param   REQUEST_METHOD          $request_method;\nfastcgi_"
  },
  {
    "path": "aegir/conf/nginx/mime.types",
    "chars": 6591,
    "preview": "types {\n  application/atom+xml                  atom;\n  application/iphone                    pxl ipa;\n  application/jav"
  },
  {
    "path": "aegir/conf/nginx/nginx",
    "chars": 10601,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          nginx\n# Required-Start:    $remote_fs $syslog\n# Required-Stop:    "
  },
  {
    "path": "aegir/conf/nginx/nginx-squeeze-init",
    "chars": 2108,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          nginx\n# Required-Start:    $local_fs $remote_fs $network $syslog\n#"
  },
  {
    "path": "aegir/conf/nginx/nginx.conf",
    "chars": 508,
    "preview": "# Nginx web server main configuration file: /etc/nginx/nginx.conf\n#\nuser www-data;\nworker_processes auto;\npid /run/nginx"
  },
  {
    "path": "aegir/conf/nginx/nginx_compact_include.conf",
    "chars": 1742,
    "preview": "#######################################################\n###  nginx compact basic configuration start\n###################"
  },
  {
    "path": "aegir/conf/nginx/nginx_high_load_off.conf",
    "chars": 93,
    "preview": "###\n### Only allowed crawlers under high load.\n###\nif ($deny_on_high_load) {\n  return 503;\n}\n"
  },
  {
    "path": "aegir/conf/nginx/nginx_speed_purge.conf",
    "chars": 534,
    "preview": "###\n### Support for https://drupal.org/project/purge module.\n###\nserver {\n  listen       127.0.0.1:8888;\n  server_name  "
  },
  {
    "path": "aegir/conf/nginx/nginx_sql_adminer.conf",
    "chars": 1224,
    "preview": "###\n### Adminer SQL Manager Redirect to HTTPS.\n###\nserver {\n  listen                       127.0.0.1:80;\n  server_name  "
  },
  {
    "path": "aegir/conf/nginx/nginx_sql_buddy.conf",
    "chars": 1217,
    "preview": "###\n### SQL Buddy Manager Redirect to HTTPS.\n###\nserver {\n  listen                       127.0.0.1:80;\n  server_name    "
  },
  {
    "path": "aegir/conf/nginx/nginx_sql_cgp.conf",
    "chars": 1214,
    "preview": "###\n### Collectd Graph Panel Redirect to HTTPS.\n###\nserver {\n  listen                       127.0.0.1:80;\n  server_name "
  },
  {
    "path": "aegir/conf/nginx/nginx_sql_chive.conf",
    "chars": 1214,
    "preview": "###\n### Chive SQL Manager Redirect to HTTPS.\n###\nserver {\n  listen                       127.0.0.1:80;\n  server_name    "
  },
  {
    "path": "aegir/conf/nginx/nginx_wild_ssl.conf",
    "chars": 1705,
    "preview": "\n### /var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf\n\nupstream nginx_http {\n  server  127.0.0.1:80;\n}\n\ns"
  },
  {
    "path": "aegir/conf/php/fpm-pool-common-legacy.conf",
    "chars": 746,
    "preview": "\ngroup = www-data\nlisten.owner = www-data\nlisten.group = www-data\nlisten.mode = 0660\nlisten.allowed_clients = 127.0.0.1\n"
  },
  {
    "path": "aegir/conf/php/fpm-pool-common-modern.conf",
    "chars": 746,
    "preview": "\ngroup = www-data\nlisten.owner = www-data\nlisten.group = www-data\nlisten.mode = 0660\nlisten.allowed_clients = 127.0.0.1\n"
  },
  {
    "path": "aegir/conf/php/fpm-pool-common.conf",
    "chars": 746,
    "preview": "\ngroup = www-data\nlisten.owner = www-data\nlisten.group = www-data\nlisten.mode = 0660\nlisten.allowed_clients = 127.0.0.1\n"
  },
  {
    "path": "aegir/conf/php/fpm-pool-foo-multi.conf",
    "chars": 1686,
    "preview": "[THISPOOL]\n\nprefix = /data/disk/foo\nuser = $pool.web\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-com"
  },
  {
    "path": "aegir/conf/php/fpm-pool-foo.conf",
    "chars": 1681,
    "preview": "[foo]\n\nprefix = /data/disk/foo\nuser = $pool.web\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.c"
  },
  {
    "path": "aegir/conf/php/fpm56-pool-www.conf",
    "chars": 809,
    "preview": "[www56]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common-leg"
  },
  {
    "path": "aegir/conf/php/fpm70-pool-www.conf",
    "chars": 893,
    "preview": "[www70]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common-leg"
  },
  {
    "path": "aegir/conf/php/fpm71-pool-www.conf",
    "chars": 893,
    "preview": "[www71]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common-leg"
  },
  {
    "path": "aegir/conf/php/fpm72-pool-www.conf",
    "chars": 893,
    "preview": "[www72]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common-leg"
  },
  {
    "path": "aegir/conf/php/fpm73-pool-www.conf",
    "chars": 893,
    "preview": "[www73]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common-leg"
  },
  {
    "path": "aegir/conf/php/fpm74-pool-www.conf",
    "chars": 893,
    "preview": "[www74]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common-leg"
  },
  {
    "path": "aegir/conf/php/fpm80-pool-www.conf",
    "chars": 886,
    "preview": "[www80]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.con"
  },
  {
    "path": "aegir/conf/php/fpm81-pool-www.conf",
    "chars": 886,
    "preview": "[www81]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.con"
  },
  {
    "path": "aegir/conf/php/fpm82-pool-www.conf",
    "chars": 886,
    "preview": "[www82]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.con"
  },
  {
    "path": "aegir/conf/php/fpm83-pool-www.conf",
    "chars": 886,
    "preview": "[www83]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.con"
  },
  {
    "path": "aegir/conf/php/fpm84-pool-www.conf",
    "chars": 886,
    "preview": "[www84]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.con"
  },
  {
    "path": "aegir/conf/php/fpm85-pool-www.conf",
    "chars": 886,
    "preview": "[www85]\n\nprefix = /var/www/$pool\nuser = $pool\nlisten = /run/$pool.fpm.socket\n\ninclude = /opt/etc/fpm/fpm-pool-common.con"
  },
  {
    "path": "aegir/conf/php/newrelic.ini",
    "chars": 411,
    "preview": "\n; New Relic\nextension=newrelic.so\n[newrelic]\nnewrelic.enabled=true\nnewrelic.license = \"REPLACE_WITH_REAL_KEY\"\nnewrelic."
  },
  {
    "path": "aegir/conf/php/php56-cli.ini",
    "chars": 72862,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php56-fpm",
    "chars": 2385,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php56-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php56-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php56.ini",
    "chars": 73442,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php70-cli.ini",
    "chars": 69408,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php70-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php70-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php70-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php70.ini",
    "chars": 70115,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php71-cli.ini",
    "chars": 71668,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php71-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php71-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php71-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php71.ini",
    "chars": 72375,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php72-cli.ini",
    "chars": 71057,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php72-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php72-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php72-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php72.ini",
    "chars": 71764,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php73-cli.ini",
    "chars": 71242,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php73-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php73-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php73-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php73.ini",
    "chars": 71949,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php74-cli.ini",
    "chars": 73117,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php74-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php74-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php74-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php74.ini",
    "chars": 73824,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php80-cli.ini",
    "chars": 72943,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php80-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php80-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php80-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php80.ini",
    "chars": 73650,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php81-cli.ini",
    "chars": 73384,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php81-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php81-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php81-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php81.ini",
    "chars": 74091,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php82-cli.ini",
    "chars": 73384,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php82-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php82-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php82-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php82.ini",
    "chars": 74091,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php83-cli.ini",
    "chars": 73872,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php83-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php83-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php83-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php83.ini",
    "chars": 74632,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php84-cli.ini",
    "chars": 69535,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php84-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php84-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php84-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php84.ini",
    "chars": 70230,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php85-cli.ini",
    "chars": 70983,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/php/php85-fpm",
    "chars": 2432,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:          php85-fpm\n# Required-Start:    $remote_fs $network\n# Required-Stop"
  },
  {
    "path": "aegir/conf/php/php85-fpm.conf",
    "chars": 4210,
    "preview": ";;;;;;;;;;;;;;;;;;;;;\n; FPM Configuration ;\n;;;;;;;;;;;;;;;;;;;;;\n\n; All relative paths in this configuration file are r"
  },
  {
    "path": "aegir/conf/php/php85.ini",
    "chars": 71680,
    "preview": "[PHP]\n\n;;;;;;;;;;;;;;;;;;;\n; About php.ini   ;\n;;;;;;;;;;;;;;;;;;;\n; PHP's initialization file, generally called php.ini"
  },
  {
    "path": "aegir/conf/redis/redis-server",
    "chars": 1935,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:\t\tredis-server\n# Required-Start:\t$syslog $remote_fs\n# Required-Stop:\t$syslog"
  },
  {
    "path": "aegir/conf/redis/redis.conf",
    "chars": 58820,
    "preview": "# Redis configuration file example.\n#\n# Note that in order to read the configuration file, Redis must be\n# started with "
  },
  {
    "path": "aegir/conf/redis/redis4.conf",
    "chars": 58820,
    "preview": "# Redis configuration file example.\n#\n# Note that in order to read the configuration file, Redis must be\n# started with "
  },
  {
    "path": "aegir/conf/redis/redis5.conf",
    "chars": 61851,
    "preview": "# Redis configuration file example.\n#\n# Note that in order to read the configuration file, Redis must be\n# started with "
  },
  {
    "path": "aegir/conf/redis/redis6.conf",
    "chars": 93882,
    "preview": "# Redis configuration file example.\n#\n# Note that in order to read the configuration file, Redis must be\n# started with "
  },
  {
    "path": "aegir/conf/redis/redis7.conf",
    "chars": 106574,
    "preview": "# Redis configuration file example.\n#\n# Note that in order to read the configuration file, Redis must be\n# started with "
  },
  {
    "path": "aegir/conf/solr9/analysis-extras.mod",
    "chars": 140,
    "preview": "# Solr module: analysis-extras\nname=analysis-extras\nlib.dir=../../modules/analysis-extras/lib\nclass=org.apache.solr.core"
  },
  {
    "path": "aegir/conf/solr9/analytics.mod",
    "chars": 122,
    "preview": "# Solr module: analytics\nname=analytics\nlib.dir=../../modules/analytics/lib\nclass=org.apache.solr.core.SolrResourceLoade"
  },
  {
    "path": "aegir/conf/solr9/clustering.mod",
    "chars": 125,
    "preview": "# Solr module: clustering\nname=clustering\nlib.dir=../../modules/clustering/lib\nclass=org.apache.solr.core.SolrResourceLo"
  },
  {
    "path": "aegir/conf/solr9/cross-dc.mod",
    "chars": 119,
    "preview": "# Solr module: cross-dc\nname=cross-dc\nlib.dir=../../modules/cross-dc/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/solr9/extraction.mod",
    "chars": 125,
    "preview": "# Solr module: extraction\nname=extraction\nlib.dir=../../modules/extraction/lib\nclass=org.apache.solr.core.SolrResourceLo"
  },
  {
    "path": "aegir/conf/solr9/gcs-repository.mod",
    "chars": 137,
    "preview": "# Solr module: gcs-repository\nname=gcs-repository\nlib.dir=../../modules/gcs-repository/lib\nclass=org.apache.solr.core.So"
  },
  {
    "path": "aegir/conf/solr9/hadoop-auth.mod",
    "chars": 128,
    "preview": "# Solr module: hadoop-auth\nname=hadoop-auth\nlib.dir=../../modules/hadoop-auth/lib\nclass=org.apache.solr.core.SolrResourc"
  },
  {
    "path": "aegir/conf/solr9/hdfs.mod",
    "chars": 107,
    "preview": "# Solr module: hdfs\nname=hdfs\nlib.dir=../../modules/hdfs/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/solr9/jaegertracer-configurator.mod",
    "chars": 170,
    "preview": "# Solr module: jaegertracer-configurator\nname=jaegertracer-configurator\nlib.dir=../../modules/jaegertracer-configurator/"
  },
  {
    "path": "aegir/conf/solr9/jwt-auth.mod",
    "chars": 119,
    "preview": "# Solr module: jwt-auth\nname=jwt-auth\nlib.dir=../../modules/jwt-auth/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/solr9/langid.mod",
    "chars": 113,
    "preview": "# Solr module: langid\nname=langid\nlib.dir=../../modules/langid/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/solr9/llm.mod",
    "chars": 104,
    "preview": "# Solr module: llm\nname=llm\nlib.dir=../../modules/llm/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/solr9/ltr.mod",
    "chars": 104,
    "preview": "# Solr module: ltr\nname=ltr\nlib.dir=../../modules/ltr/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/solr9/opentelemetry.mod",
    "chars": 134,
    "preview": "# Solr module: opentelemetry\nname=opentelemetry\nlib.dir=../../modules/opentelemetry/lib\nclass=org.apache.solr.core.SolrR"
  },
  {
    "path": "aegir/conf/solr9/s3-repository.mod",
    "chars": 134,
    "preview": "# Solr module: s3-repository\nname=s3-repository\nlib.dir=../../modules/s3-repository/lib\nclass=org.apache.solr.core.SolrR"
  },
  {
    "path": "aegir/conf/solr9/scripting.mod",
    "chars": 122,
    "preview": "# Solr module: scripting\nname=scripting\nlib.dir=../../modules/scripting/lib\nclass=org.apache.solr.core.SolrResourceLoade"
  },
  {
    "path": "aegir/conf/solr9/sql.mod",
    "chars": 104,
    "preview": "# Solr module: sql\nname=sql\nlib.dir=../../modules/sql/lib\nclass=org.apache.solr.core.SolrResourceLoader\n"
  },
  {
    "path": "aegir/conf/tpl/migration.html",
    "chars": 476,
    "preview": "<html>\n<head>\n<title>Server Migration</title>\n<style type=\"text/css\">\n<!--\nbody {\nbackground-color: #ffffff;\n}\n-->\n</sty"
  },
  {
    "path": "aegir/conf/tpl/robots.txt",
    "chars": 2298,
    "preview": "#\n# robots.txt\n#\n# This file is to prevent the crawling and indexing of certain parts\n# of your site by web crawlers and"
  },
  {
    "path": "aegir/conf/tpl/setupmail.txt",
    "chars": 5368,
    "preview": "Hello,\n\nWelcome to your new Ægir control panel, designed for easy Drupal multi-site deployment, development, and managem"
  },
  {
    "path": "aegir/conf/tpl/uc.html",
    "chars": 420,
    "preview": "<html>\n<head>\n<title>Under Construction</title>\n<style type=\"text/css\">\n<!--\nbody {\nbackground-color: #000000;\n}\n-->\n</s"
  },
  {
    "path": "aegir/conf/tpl/upgrademail.txt",
    "chars": 3339,
    "preview": "Hello,\n\nWe are pleased to inform you that your Ægir instance has been successfully upgraded to our new HTTP/3 Edition [b"
  },
  {
    "path": "aegir/conf/valkey/valkey-server",
    "chars": 1944,
    "preview": "#!/bin/bash\n\n### BEGIN INIT INFO\n# Provides:\t\tvalkey-server\n# Required-Start:\t$syslog $remote_fs\n# Required-Stop:\t$syslo"
  },
  {
    "path": "aegir/conf/valkey/valkey7.conf",
    "chars": 107015,
    "preview": "# Valkey configuration file example.\n#\n# Note that in order to read the configuration file, the server must be\n# started"
  },
  {
    "path": "aegir/conf/valkey/valkey8.conf",
    "chars": 119982,
    "preview": "# Valkey configuration file example.\n#\n# Note that in order to read the configuration file, the server must be\n# started"
  },
  {
    "path": "aegir/conf/valkey/valkey9.conf",
    "chars": 125590,
    "preview": "# Valkey configuration file example.\n#\n# Note that in order to read the configuration file, the server must be\n# started"
  }
]

// ... and 416 more files (download for full content)

About this extraction

This page contains the full source code of the omega8cc/boa GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 616 files (9.6 MB), approximately 2.6M tokens, and a symbol index with 2 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!