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/OCTOPUS.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
271 lines (235 sloc)
5.06 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 | |
| ###----------------------------------------### | |
| ### | |
| ### Octopus 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 | |
| ### | |
| ###----------------------------------------### | |
| ### | |
| ### Default values for main variables | |
| ### | |
| _USER=o1 | |
| _MY_EMAIL="noc@omega8.cc" | |
| _CLIENT_EMAIL="notify@omega8.cc" | |
| _CLIENT_OPTION=SSD | |
| _CLIENT_SUBSCR=Y | |
| _CLIENT_CORES=8 | |
| ### | |
| ### Required by AegirSetupA script, running in | |
| ### the same env, to avoid chicken/egg race. | |
| ### | |
| export _USER="${_USER}" | |
| ### | |
| ### Variables | |
| ### | |
| _DRUSH_VERSION=8.4.12.1 | |
| _NOW=$(date +%y%m%d-%H%M%S 2>&1) | |
| _NOW=${_NOW//[^0-9-]/} | |
| _PLATFORMS_ONLY=NO | |
| _PURGE_FOR_SEVEN=YES | |
| _REDIS_C_VERSION=com-19-04-2021 | |
| _REDIS_L_VERSION=7.x-3.19.1 | |
| _REDIS_N_VERSION=com-19-04-2021 | |
| _REDIS_T_VERSION=8.x-1.6.1 | |
| _SMALLCORE6=6.60.1 | |
| _SMALLCORE7=7.93.1 | |
| _SMALLCORE8=8.9 | |
| _SMALLCORE92=9.2 | |
| _SMALLCORE93=9.3 | |
| _SPINNER=YES | |
| _T_BUILD=HEAD | |
| _TODAY=$(date +%y%m%d 2>&1) | |
| _TODAY=${_TODAY//[^0-9]/} | |
| _F_TIME=$(date 2>&1) | |
| _USRG=users | |
| _WEBG=www-data | |
| 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 | |
| ### | |
| ### Instance specific variables | |
| ### | |
| _WEB="${_USER}.web" | |
| _DOMAIN="${_USER}.$(uname -n 2>&1)" | |
| _ROOT="/data/disk/${_USER}" | |
| _THIS_DB_PORT=3306 | |
| octCnf="/root/.${_USER}.octopus.cnf" | |
| octInc="${_ROOT}/config/includes" | |
| octTpl="${_ROOT}/.drush/sys/provision/http/Provision/Config/Nginx" | |
| octSetTpl="${_ROOT}/.drush/sys/provision/Provision/Config/Drupal" | |
| ### | |
| ### Helper variables | |
| ### | |
| bldPth="/opt/tmp/boa" | |
| crlGet="-L --max-redirs 10 -k -s --retry 10 --retry-delay 5 -A iCab" | |
| filIncO="octopus.sh.cnf" | |
| gCb="git clone --branch" | |
| gitHub="https://github.com/omega8cc" | |
| gitLab="https://gitlab.com/omega8cc" | |
| libFnc="${bldPth}/lib/functions" | |
| tocIncO="${filIncO}.${_USER}" | |
| vBs="/var/backups" | |
| ### | |
| ### Distributions | |
| ### | |
| _AGOV=3.12 | |
| _CIVICRM_M6=4.1.6 | |
| _CIVICRM_M7=4.3.7 | |
| _COD=1.0-alpha5 | |
| _COMMERCE1=1.68 | |
| _COMMERCE2=2.71 | |
| _COMMONS2=2.27 | |
| _COMMONS3=3.50 | |
| _DRUPAL7="drupal-${_SMALLCORE7}" | |
| _DRUPAL8="drupal-${_SMALLCORE8}" | |
| _DRUPAL9="drupal-${_SMALLCORE93}" | |
| _ERPAL=2.3 | |
| _GUARDR=2.55 | |
| _LIGHTNING=5.1.5 | |
| _OPENACADEMY=1.1 | |
| _OPENAID=2.8 | |
| _OPENATRIUM7=2.651 | |
| _OPENBLOG=1.0-alpha3 | |
| _OPENCHURCH1=1.17-beta2 | |
| _OPENCHURCH2=2.2 | |
| _OPENDEALS=1.35 | |
| _OPENLUCIUS=2.0.0 | |
| _OPENOUTREACH=1.69 | |
| _OPENPUBLIC=1.30 | |
| _OPENPUBLISH=1.0-beta7 | |
| _OPENSCHOLAR=3.28.0 | |
| _OPIGNOLMS7=1.55 | |
| _OPIGNOLMS8=2.20 | |
| _OPIGNOLMS9=3.0.0 | |
| _PANOPOLY=1.86 | |
| _RECRUITER=1.7 | |
| _RESTAURANT=1.15 | |
| _THUNDER=6.3.3 | |
| _UBERCART6=2.15 | |
| _UBERCART7=3.13 | |
| _VARBASE=9.0.4 | |
| _SOCIAL=10.3.7 | |
| ### | |
| ### 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 | |
| ### | |
| if [ -e "${vBs}/${tocIncO}" ]; then | |
| source "${vBs}/${tocIncO}" | |
| tInc="${vBs}/${tocIncO}" | |
| elif [ -e "${vBs}/${filIncO}" ]; then | |
| source "${vBs}/${filIncO}" | |
| tInc="${vBs}/${filIncO}" | |
| else | |
| panic_exit "${tInc}" | |
| fi | |
| ### | |
| ### Download helpers and libs | |
| ### | |
| download_helpers_libs | |
| ### | |
| ### Include shared functions | |
| ### | |
| _FL="helper dns satellite" | |
| for f in ${_FL}; do | |
| [ -r "${libFnc}/${f}.sh.inc" ] || panic_exit "${f}" | |
| source "${libFnc}/${f}.sh.inc" | |
| done | |
| ### | |
| ### Welcome msg | |
| ### | |
| echo " " | |
| msg "Skynet Agent v.${_X_VERSION} welcomes you aboard!" | |
| echo " " | |
| sleep 3 | |
| ### | |
| ### More local default variables | |
| ### | |
| _LASTNUM=001 | |
| _LAST_HMR=001 | |
| _LAST_ALL=001 | |
| _DISTRO=001 | |
| _HM_DISTRO=001 | |
| _ALL_DISTRO=001 | |
| _STATUS=INIT | |
| ### | |
| ### Misc checks | |
| ### | |
| satellite_check_php_compatibility | |
| satellite_check_octopus_versus_barracuda_version | |
| satellite_if_head_github_connection_test | |
| satellite_if_sql_exception_test | |
| satellite_if_running_as_root_octopus | |
| satellite_check_sanitize_user_name | |
| satellite_if_localhost_mode_magic | |
| satellite_check_sanitize_domain_name | |
| satellite_detect_vm_family | |
| check_git_repos | |
| ### | |
| ### Main procedures | |
| ### | |
| satellite_cnf | |
| satellite_if_init_or_upgrade | |
| satellite_if_major_upgrade | |
| satellite_if_check_dns | |
| satellite_checkpoint | |
| satellite_pre_cleanup | |
| satellite_make | |
| satellite_post_cleanup | |
| exit 0 | |
| ###----------------------------------------### | |
| ### | |
| ### Octopus Aegir Installer | |
| ### Copyright (C) 2010-2022 Omega8.cc | |
| ### noc@omega8.cc www.omega8.cc | |
| ### | |
| ###----------------------------------------### |