Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
boa/BARRACUDA.sh.txt
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
453 lines (383 sloc)
7.91 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ###----------------------------------------### | |
| ### | |
| ### Barracuda Aegir Installer | |
| ### | |
| ### Copyright (C) 2010-2022 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 | |
| ### | |
| ###----------------------------------------### | |
| ### | |
| ### 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.0.14 | |
| _CSF_VRN=14.15 | |
| _CURL_VRN=7.86.0 | |
| _DB_SRC=ftp.osuosl.org | |
| _DRUSH_EIGHT_TEST_VRN=8.4.12-force | |
| _DRUSH_EIGHT_VRN=8.4.12.1 | |
| _DRUSH_ELEVEN_VRN=11.3.2 | |
| _DRUSH_LAUNCHER_VRN=0.10.1 | |
| _DRUSH_TEN_VRN=10.6.2 | |
| _GALERA_10_VRN=10.0.37 | |
| _GEOS_VRN=3.7.1 | |
| _GIT_VRN=2.20.1 | |
| _GOACCESS_VRN=1.5.3 | |
| _ICU_VRN=52_2 | |
| _IMAGE_MAGICK_VRN=7.0.11-13 | |
| _IMAGICK_OLD_VRN=3.1.2 | |
| _IMAGICK_VRN=3.6.0 | |
| _IONCUBE_VRN=11.0.1 | |
| _JETTY_7_VRN=7.6.17.v20150415 | |
| _JETTY_8_VRN=8.1.17.v20150415 | |
| _JETTY_9_VRN=9.2.16.v20160414 | |
| _JSMIN_LEGACY_VRN=1.1.0 | |
| _JSMIN_PHP7_VRN=3.0.0 | |
| _JSMIN_VRN=2.0.0 | |
| _LIB_TIDY_VRN=5.2.0 | |
| _LIB_YAML_VRN=0.2.5 | |
| _LOGJ4_VRN=1.2.17 | |
| _LSHELL_VRN=0.9.18.9 | |
| _MAILPARSE_VRN=2.1.6 | |
| _MARIADB_10_2_VRN=10.2.39 | |
| _MARIADB_10_3_VRN=10.3.30 | |
| _MARIADB_10_4_VRN=10.4.20 | |
| _MONGO_VRN=1.6.14 | |
| _MONGODB_VRN=1.2.5 | |
| _MSS_VRN=master-20-03-2015 | |
| _MYQUICK_VRN=0.11.5-2 | |
| _MYSQLTUNER_VRN=1.9.4 | |
| _NGINX_VRN=1.23.2 | |
| _OPENSSH_VRN=9.1p1 | |
| _OPENSSL_LEGACY_VRN=1.0.2u | |
| _OPENSSL_CURRENT_VRN=1.1.1s | |
| _PDNSD_VRN=1.2.9a | |
| _PERCONA_5_7_VRN=5.7 | |
| _PHP56_API=20131226 | |
| _PHP56_VRN=5.6.40 | |
| _PHP_APCU=5.1.20 | |
| _PHP_IGBINARY=3.2.12 | |
| _PHP_MCRYPT=1.0.4 | |
| _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.26 | |
| _PHP81_API=20210902 | |
| _PHP81_VRN=8.1.13 | |
| _PHPREDIS_FIVE_VRN=5.3.7 | |
| _PHPREDIS_FOUR_VRN=4.3.0 | |
| _PURE_FTPD_VRN=1.0.49 | |
| _PXC_VRN=1.4.16 | |
| _REDIS_FIVE_VRN=5.0.9 | |
| _REDIS_FOUR_VRN=4.0.14 | |
| _REDIS_SIX_VRN=6.2.7 | |
| _REDIS_SEVEN_VRN=7.0.5 | |
| _RUBY_VRN=3.1.2 | |
| _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 | |
| _TWIGC_VRN=1.24.0 | |
| _UPROGRESS_LEGACY_VRN=1.0.3.1 | |
| _UPROGRESS_SEVEN_VRN=2.0.1.6 | |
| _UPROGRESS_EIGHT_VRN=2.0.2 | |
| _VNSTAT_VRN=2.7 | |
| _WKHTMLTOX_VRN=12.6-1 | |
| _YAML_PHP7_VRN=2.2.2 | |
| _YAML_VRN=1.3.2 | |
| _ZLIB_VRN=1.2.11 | |
| ### | |
| ### Default variables | |
| ### | |
| _CUSTOM_NAME="nginx" | |
| _DRUSH_VERSION="${_DRUSH_EIGHT_VRN}" | |
| _DRUSH_VERSION_TEST="${_DRUSH_EIGHT_TEST_VRN}" | |
| _FORCE_REDIS_RESTART=NO | |
| _LOC_OSR="" | |
| _NOW=$(date +%y%m%d-%H%M%S 2>&1) | |
| _NOW=${_NOW//[^0-9-]/} | |
| _PURGE_ALL_THISHTIP=NO | |
| _SMALLCORE7=7.93.1 | |
| _SPINNER=YES | |
| _THIS_DB_PORT=3306 | |
| PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/usr/bin:/usr/sbin:/bin:/sbin | |
| SHELL=/bin/bash | |
| 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 10 -k -s --retry 10 --retry-delay 5 -A iCab" | |
| forCer="-fuy --allow-unauthenticated --reinstall" | |
| 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/xdrago/log" | |
| 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 | |
| if [ -z "${TERM+x}" ]; then | |
| export TERM=vt100 | |
| fi | |
| ### | |
| ### Clean pid files on exit | |
| ### | |
| clean_pid_exit() { | |
| rm -f /var/run/boa_wait.pid | |
| rm -f /var/run/boa_run.pid | |
| service cron start &> /dev/null | |
| 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 | |
| } | |
| ### | |
| ### Include default settings and basic functions | |
| ### | |
| [ -r "${vBs}/${filIncB}" ] || panic_exit "${vBs}/${filIncB}" | |
| source "${vBs}/${filIncB}" | |
| ### | |
| ### Download helpers and libs | |
| ### | |
| download_helpers_libs | |
| ### | |
| ### Include shared functions | |
| ### | |
| _FL="helper dns system sql redis nginx php jetty 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} welcomes you aboard!" | |
| echo " " | |
| sleep 3 | |
| ### | |
| ### Early procedures | |
| ### | |
| normalize_ip_name_variables | |
| mode_detection | |
| check_exception_mycnf | |
| virt_detection | |
| os_detection | |
| ### | |
| ### Basic packages check and update | |
| ### | |
| basic_packages_install_on_init | |
| update_sources_list | |
| more_packages_install_on_init | |
| ### | |
| ### Misc checks | |
| ### | |
| check_boa_php_compatibility | |
| check_boa_version | |
| check_github_for_aegir_head_mode | |
| check_db_src | |
| check_git_repos | |
| check_ip_hostname | |
| check_prepare_dirs_permissions | |
| ### | |
| ### Optional major system upgrades | |
| ### | |
| if_jessie_to_stretch | |
| ### | |
| ### Download system-wide Drush versions | |
| ### | |
| get_drush_versions | |
| ### | |
| ### Upgrade only Aegir Master Instance (obsolete mode) | |
| ### | |
| if_upgrade_only_aegir_master | |
| ### | |
| ### System packages install and update | |
| ### | |
| sys_packages_update | |
| if_proxysql_update | |
| sys_packages_install | |
| check_fix_java | |
| fix_postfix | |
| install_with_aptitude_deps | |
| fix_locales | |
| install_with_aptitude_deps | |
| ### | |
| ### Do not allow strong passwords until locales work properly | |
| ### | |
| if [ "${_LOCALE_TEST}" = "BROKEN" ]; then | |
| _STRONG_PASSWORDS=NO | |
| fi | |
| ### | |
| ### Install OpenSSH from sources if needed | |
| ### | |
| if [ "${_SSH_FROM_SOURCES}" = "YES" ]; then | |
| if [ "${_THIS_OS}" = "Debian" ]; then | |
| install_ssh_src | |
| fi | |
| fi | |
| ### | |
| ### Install Percona server | |
| ### | |
| install_db_server | |
| ### | |
| ### Finalize initial Percona server setup | |
| ### | |
| init_sql_root_credentials | |
| update_sql_root_credentials | |
| ### | |
| ### Install other services and apply fixes | |
| ### | |
| run_aptitude_full_upgrade | |
| install_with_aptitude_deps | |
| install_php_deps | |
| if_install_bind | |
| check_install_latest_git | |
| install_upgrade_nginx | |
| kill_nash | |
| fix_sftp_ftps_modern | |
| disable_old_purge_cruft_machine | |
| install_wkhtmltox | |
| fix_libs_php | |
| fix_libssl | |
| check_smtp | |
| check_nginx_initd | |
| install_vnstat | |
| install_update_xdrago | |
| install_curl_src | |
| check_install_myquick | |
| if_install_magick | |
| install_update_php | |
| php_upgrade_all | |
| check_fix_php | |
| check_fix_avatars | |
| check_fix_umask | |
| check_fix_bin_extra | |
| install_update_lshell | |
| install_update_redis | |
| check_fix_newrelic | |
| check_fix_java | |
| ### | |
| ### PHP config update | |
| ### | |
| check_update_php_config | |
| ### | |
| ### Install or upgrade Aegir Master Instance | |
| ### | |
| install_upgrade_aegir_master | |
| fix_nginx_mime | |
| nginx_wildcard_ssl | |
| ### | |
| ### Optional add-on services | |
| ### | |
| if_install_ffmpeg | |
| if_install_bzr | |
| if_install_ftpd | |
| if_install_jetty | |
| if_install_adminer | |
| if_install_chive | |
| if_install_sqlbuddy | |
| if_install_collectd | |
| if_install_hhvm | |
| if_install_webmin | |
| if_install_bind | |
| if_install_rvm | |
| ### | |
| ### Update initd scripts | |
| ### | |
| update_initd | |
| ### | |
| ### Make sshd armoured | |
| ### | |
| sshd_armour | |
| ### | |
| ### Update barracuda log and system settings | |
| ### | |
| update_barracuda_log | |
| update_sysctl | |
| update_apticron | |
| if_display_login_link | |
| fix_update_nginx_config | |
| ### | |
| ### Install or upgrade csf/lfd monitoring | |
| ### | |
| install_upgrade_csf_lfd | |
| ### | |
| ### Install or upgrade DNS cache pdnsd server | |
| ### | |
| if_install_upgrade_pdnsd | |
| ### | |
| ### Complete system checks and cleanup | |
| ### | |
| complete | |
| exit 0 | |
| ###----------------------------------------### | |
| ### | |
| ### Barracuda Aegir Installer | |
| ### Copyright (C) 2010-2022 Omega8.cc | |
| ### noc@omega8.cc www.omega8.cc | |
| ### | |
| ###----------------------------------------### |