Ticket #548: 2.0.8-2.0.9.diff

File 2.0.8-2.0.9.diff, 250.8 KB (added by jim, 4 years ago)

Git Diff of nginx-for-drupal BOA 2.0.8-2.0.9

  • BARRACUDA.sh.txt

    diff --git a/BARRACUDA.sh.txt b/BARRACUDA.sh.txt
    index 4ff6050..8b50509 100755
    a b _EASY_LOCALHOST=NO 
    180180 
    181181 
    182182###----------------------------------------### 
    183 ### PHP, NGINX AND REDIS INSTALL METHOD    ### 
     183### PHP INSTALL METHOD                     ### 
    184184###----------------------------------------### 
    185185### 
    186186### This option is used only in Debian Squeeze 
    187 ### and Ubuntu Precise. 
     187### Debian Wheezy and Ubuntu Precise. 
    188188### 
    189189### By default Barracuda uses Dotdeb packages 
    190 ### to install PHP 5.3, Nginx and Redis on 
    191 ### Debian Squeeze and standard Ubuntu Precise 
    192 ### packages to install PHP 5.3 and Nginx on 
    193 ### Ubuntu Precise. 
     190### to install PHP 5.3 on Debian Squeeze and 
     191### standard Ubuntu packages to install 
     192### PHP 5.3 on Ubuntu Precise. 
    194193### 
    195194### They are sometimes not fully up to date 
    196 ### when new version of PHP or Nginx is 
    197 ### released, so even if it is slower to build 
    198 ### from sources, it may be useful. 
     195### when new version of PHP is released, so 
     196### even if it is slower to build from sources 
     197### it may be useful. 
    199198### 
    200 ### If you prefer to build from sources also 
    201 ### PHP 5.3, Nginx and Redis on Squeeze or 
    202 ### Precise, change this to: 
     199### If you want to build PHP 5.3 from sources 
     200### on Squeeze or Precise, change this to: 
    203201### 
    204202### _BUILD_FROM_SRC=YES 
    205203### 
     204### Note that Debian Wheezy will force the 
     205### build from sources, at least until there 
     206### are Dotdeb packages for PHP 5.3 available. 
     207### 
    206208### Note that PHP 5.2, if used, will be always 
    207209### installed from sources in all supported 
    208210### OS flavors. 
    209211### 
    210212### NOTE! We have switched to always build 
    211213### Nginx from sources, because the packages 
    212 ### based version is really bloated, so this 
    213 ### option works as explained above only when 
    214 ### you will change _NGINX_FROM_SOURCES=YES 
    215 ### to _NGINX_FROM_SOURCES=NO in the advanced 
    216 ### config section further below. This may be 
    217 ### useful when you prefer to run system only 
    218 ### updates with apt-get instead of running 
    219 ### Barracuda. 
     214### based version is really bloated. 
    220215### 
    221216_BUILD_FROM_SRC=NO 
    222217 
    _FULL_FORCE_REINSTALL=NO 
    410405 
    411406### 
    412407### Use YES to run major system upgrade 
    413 ### from Debian Lenny to Squeeze. 
     408### from Debian Squeeze to Debian Wheezy. 
     409### 
     410_SQUEEZE_TO_WHEEZY=NO 
     411 
     412### 
     413### Use YES to run major system upgrade 
     414### from Debian Lenny to Debian Squeeze. 
    414415### 
    415416_LENNY_TO_SQUEEZE=NO 
    416417 
    _SMTP_RELAY_HOST="" 
    697698### values. 
    698699### 
    699700### It will also disable all DNS and SMTP 
    700 ### relay tests and enable drush debug mode 
    701 ### automatically. 
     701### relay tests automatically. 
    702702### 
    703703### Note that for non-local installs with 
    704704### private and/or dynamic IPs on servers 
    _USE_STOCK=NO 
    903903### DON'T EDIT ANYTHING BELOW THIS LINE    ### 
    904904###----------------------------------------### 
    905905 
    906 _INSTALLER_VERSION=BOA-2.0.8 
     906_INSTALLER_VERSION=BOA-2.0.9 
    907907 
    908908### 
    909909### Software versions 
    _JETTY_8_VERSION=8.1.10.v20130312 
    922922_JETTY_9_VERSION=9.0.0.v20130308 
    923923_LSHELL_VERSION=0.9.15.1-sec-auto-normalize 
    924924_MARIADB_VERSION=5.5.30 
    925 _NGINX_VERSION=1.3.15 
     925_NGINX_VERSION=1.5.0 
    926926_PERCONA_VERSION=5.5.30 
    927 _PHP_VERSION_NEW=5.3.23 
     927_PHP_VERSION_NEW=5.3.25 
    928928_PHP_VERSION=5.2.17 
    929929_PURE_FTPD_VERSION=1.0.36 
    930 _REDIS_VERSION=2.6.12 
     930_REDIS_VERSION=2.6.13 
    931931_SOLR_1_VERSION=1.4.1 
    932932_SOLR_3_VERSION=3.6.2 
    933933_SOLR_4_VERSION=4.2.0 
    not_supported_os () { 
    10171017  msg "== FATAL ERROR ==" 
    10181018  msg "Invalid install script or OS used" 
    10191019  msg "It is not any supported Debian or Ubuntu version" 
    1020   msg "You need Debian - Squeeze (recommended)" 
     1020  msg "You need Debian - Squeeze (recommended) or Wheezy" 
    10211021  msg "or Ubuntu - Precise or Lucid" 
    10221022  exit 1 
    10231023} 
    st_runner () { 
    10891089# 
    10901090# Remove dangerous stuff from the string. 
    10911091sanitize_string () { 
    1092   echo "$1" | sed 's/[\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
     1092  echo "$1" | sed 's/[\\\/\^\?\>\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
    10931093} 
    10941094# 
    10951095# Find correct IP. 
    fix_php_ini_redis () { 
    11471147  fi 
    11481148} 
    11491149# 
     1150# Forced Redis password update. 
     1151forced_redis_password_update () { 
     1152  msg "INFO: Generating random password for Redis server" 
     1153  touch /root/.redis.pass.txt 
     1154  chmod 0600 /root/.redis.pass.txt &> /dev/null 
     1155  _ESC_RPASS="" 
     1156  _LEN_RPASS=0 
     1157  if [ "$_STRONG_PASSWORDS" = "YES" ] ; then 
     1158    _ESC_RPASS=$(randpass 32 alnum) 
     1159    _ESC_RPASS=`echo -n $_ESC_RPASS | tr -d "\n"` 
     1160    _LEN_RPASS=$(echo ${#_ESC_RPASS}) 
     1161  fi 
     1162  if [ -z "$_ESC_RPASS" ] || [ $_LEN_RPASS -lt 19 ] ; then 
     1163    _ESC_RPASS=`pwgen -v -s -1` 
     1164    _ESC_RPASS=`echo -n $_ESC_RPASS | tr -d "\n"` 
     1165    _ESC_RPASS=`sanitize_string "$_ESC_RPASS"` 
     1166  fi 
     1167  echo "$_ESC_RPASS" > /root/.redis.pass.txt 
     1168  touch /var/log/sec-redis-pass-$_INSTALLER_VERSION-$_NOW.log 
     1169  _FORCE_REDIS_RESTART=YES 
     1170  sed -i "s/^requirepass.*/requirepass $_ESC_RPASS/g" /etc/redis/redis.conf &> /dev/null 
     1171  chown redis:redis /etc/redis/redis.conf 
     1172  chmod 0600 /etc/redis/redis.conf 
     1173} 
     1174# 
    11501175# Set or update Redis password. 
    11511176update_redis_password () { 
    11521177  if [ -e "/etc/redis/redis.conf" ] ; then 
    1153     if [ ! -e "/var/log/sec-redis-pass-$_INSTALLER_VERSION-$_NOW.log" ] || [ ! -e "/root/.redis.pass.txt" ] ; then 
    1154       msg "INFO: Generating random password for Redis server" 
    1155       touch /root/.redis.pass.txt 
    1156       chmod 0600 /root/.redis.pass.txt &> /dev/null 
    1157       _ESC_RPASS="" 
    1158       _LEN_RPASS=0 
    1159       if [ "$_STRONG_PASSWORDS" = "YES" ] ; then 
    1160         _ESC_RPASS=$(randpass 32 alnum) 
    1161         _ESC_RPASS=`echo -n $_ESC_RPASS | tr -d "\n"` 
    1162         _LEN_RPASS=$(echo ${#_ESC_RPASS}) 
    1163       fi 
    1164       if [ -z "$_ESC_RPASS" ] || [ $_LEN_RPASS -lt 19 ] ; then 
    1165         _ESC_RPASS=`pwgen -v -s -1` 
    1166         _ESC_RPASS=`echo -n $_ESC_RPASS | tr -d "\n"` 
    1167         _ESC_RPASS=`sanitize_string "$_ESC_RPASS"` 
     1178    if [ ! -e "/var/log/sec-redis-pass-$_INSTALLER_VERSION-$_NOW.log" ] ; then 
     1179      if [ ! -e "/root/.redis.no.new.password.cnf" ] || [ ! -e "/root/.redis.pass.txt" ] ; then 
     1180         forced_redis_password_update 
    11681181      fi 
    1169       echo "$_ESC_RPASS" > /root/.redis.pass.txt 
    1170       touch /var/log/sec-redis-pass-$_INSTALLER_VERSION-$_NOW.log 
    1171       _FORCE_REDIS_RESTART=YES 
    11721182    fi 
    11731183  fi 
    11741184  if [ -e "/root/.redis.pass.txt" ] && [ -e "/etc/redis/redis.conf" ] ; then 
    update_redis_password () { 
    11781188    else 
    11791189      RPASS="$_ESC_RPASS" 
    11801190    fi 
    1181     sed -i "s/^requirepass.*/requirepass $RPASS/g" /etc/redis/redis.conf &> /dev/null 
    1182     sed -i "s/isfoobared/$RPASS/g" /data/conf/global.inc                 &> /dev/null 
    1183     sed -i "s/isfoobared/$RPASS/g" /var/aegir/config/includes/global.inc &> /dev/null 
    1184     chown redis:redis /etc/redis/redis.conf 
    1185     chmod 0600 /etc/redis/redis.conf 
     1191    _REDIS_PWD_TEST=`grep "'$RPASS'" /data/conf/global.inc 2>&1` 
     1192    if [[ "$_REDIS_PWD_TEST" =~ "'$RPASS'" ]] ; then 
     1193      true 
     1194    else 
     1195      if [ ! -z "$RPASS" ] ; then 
     1196        mkdir -p /data/conf 
     1197        if [ -e "/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf" ] ; then 
     1198          cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /data/conf/global.inc 
     1199        else 
     1200          cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.aegir.txt /data/conf/global.inc 
     1201        fi 
     1202        sed -i "s/isfoobared/$RPASS/g" /data/conf/global.inc &> /dev/null 
     1203      fi 
     1204    fi 
     1205    if [ -e "/var/aegir/config/includes" ] && [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/data/conf/global.inc" ] ; then 
     1206      rm -f /var/aegir/config/includes/global.inc 
     1207      ln -s /data/conf/global.inc /var/aegir/config/includes/global.inc 
     1208    fi 
    11861209  fi 
    11871210} 
    11881211# 
    update_redis_password () { 
    11901213install_redis_src () { 
    11911214  msg "INFO: Installing Redis update for $_THIS_OS/$_THIS_RV, please wait..." 
    11921215  mrun "sleep 1" 
    1193   if [ "$_REL_VERSION" = "dummy" ] ; then 
    1194     st_runner "$_INSTAPP redis-server" 2> /dev/null 
    1195   else 
    1196     if [ ! -e "/var/lib/redis" ] ; then 
    1197       st_runner "adduser --system --group redis" 2> /dev/null 
    1198     fi 
    1199     cd /var/opt 
    1200     rm -f -r redis* 
    1201     wget -q -U iCab http://files.aegir.cc/dev/redis-$_REDIS_VERSION.tar.gz 
    1202     tar -xzf redis-$_REDIS_VERSION.tar.gz 
    1203     cd redis-$_REDIS_VERSION 
    1204     st_runner "make --quiet" 2> /dev/null 
    1205     st_runner "make --quiet install" 2> /dev/null 
    1206     if [ -e "/var/lib/redis" ] ; then 
    1207       st_runner "service redis-server stop" &> /dev/null 
    1208       mrun "sleep 1" 
    1209       killall -9 redis-server &> /dev/null 
    1210     fi 
    1211     cd /usr/local/bin 
    1212     if [ ! -L "/usr/local/bin/redis-server" ] ; then 
    1213       cp -p redis-server /usr/bin/ 
    1214     fi 
    1215     cp -p redis-benchmark /usr/bin/ 
    1216     cp -p redis-cli /usr/bin/ 
    1217     cp -p redis-check-dump /usr/bin/ 
    1218     cp -p redis-check-aof /usr/bin/ 
     1216  if [ ! -e "/var/lib/redis" ] ; then 
     1217    st_runner "adduser --system --group redis" 2> /dev/null 
    12191218  fi 
     1219  cd /var/opt 
     1220  rm -f -r redis* 
     1221  wget -q -U iCab http://files.aegir.cc/dev/redis-$_REDIS_VERSION.tar.gz 
     1222  tar -xzf redis-$_REDIS_VERSION.tar.gz 
     1223  cd redis-$_REDIS_VERSION 
     1224  st_runner "make --quiet" 2> /dev/null 
     1225  st_runner "make --quiet install" 2> /dev/null 
     1226  if [ -e "/var/lib/redis" ] ; then 
     1227    st_runner "service redis-server stop" &> /dev/null 
     1228    mrun "sleep 1" 
     1229    killall -9 redis-server &> /dev/null 
     1230  fi 
     1231  cd /usr/local/bin 
     1232  if [ ! -L "/usr/local/bin/redis-server" ] ; then 
     1233    cp -p redis-server /usr/bin/ 
     1234  fi 
     1235  cp -p redis-benchmark /usr/bin/ 
     1236  cp -p redis-cli /usr/bin/ 
     1237  cp -p redis-check-dump /usr/bin/ 
     1238  cp -p redis-check-aof /usr/bin/ 
    12201239  cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/redis-server /etc/init.d/redis-server 
    12211240  chmod 755 /etc/init.d/redis-server &> /dev/null 
    12221241  st_runner "update-rc.d redis-server defaults" &> /dev/null 
    set_xterm () { 
    12571276  _XTERM_TEST=$(grep $_INSTALLER_VERSION /root/.bashrc) 
    12581277  if [[ "$_XTERM_TEST" =~ "$_INSTALLER_VERSION" ]] ; then 
    12591278    sed -i "s/^export TERM=.*/export TERM=xterm-color/g" /root/.bashrc &> /dev/null 
    1260   else 
    1261     cp -af /root/.bashrc /root/.bashrc.bak.$_NOW 
    1262     cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/boa.bashrc.txt /root/.bashrc 
    12631279  fi 
    12641280} 
    12651281# 
    enable_purge_cruft_machine () { 
    13161332    true 
    13171333  else 
    13181334    if [[ "$_THISHOST" =~ ".host8." ]] ; then 
    1319       echo "22 2    * * 7   root    bash /var/xdrago/purge_cruft.sh" >> /etc/crontab 
     1335      echo "22 2    * * 7   root    bash /var/xdrago/purge_cruft.sh >/dev/null 2>&1" >> /etc/crontab 
    13201336      sed -i "/^$/d" /etc/crontab &> /dev/null 
    13211337    fi 
    13221338  fi 
    fix_php_ext () { 
    13311347      if [ -e "/var/backups/php53-20090626/newrelic.so" ] ; then 
    13321348        mv -f /var/backups/php53-20090626/newrelic.so /usr/lib/php5/20090626/ &> /dev/null 
    13331349      fi 
     1350      if [ -e "/var/backups/php53-20090626/mongo.so" ] ; then 
     1351        mv -f /var/backups/php53-20090626/mongo.so /usr/lib/php5/20090626/ &> /dev/null 
     1352      fi 
     1353      if [ -e "/var/backups/php53-20090626/geos.so" ] ; then 
     1354        mv -f /var/backups/php53-20090626/geos.so /usr/lib/php5/20090626/ &> /dev/null 
     1355      fi 
    13341356    elif [ -e "/usr/lib/php5/20090626+lfs" ] && [ -L "/opt/local/lib/php/extensions/no-debug-non-zts-20090626" ] ; then 
    13351357      mkdir -p /var/backups/php53-20090626+lfs 
    13361358      mv -f /usr/lib/php5/20090626+lfs/* /var/backups/php53-20090626+lfs/ &> /dev/null 
    13371359      if [ -e "/var/backups/php53-20090626+lfs/newrelic.so" ] ; then 
    13381360        mv -f /var/backups/php53-20090626+lfs/newrelic.so /usr/lib/php5/20090626+lfs/ &> /dev/null 
    13391361      fi 
     1362      if [ -e "/var/backups/php53-20090626+lfs/mongo.so" ] ; then 
     1363        mv -f /var/backups/php53-20090626+lfs/mongo.so /usr/lib/php5/20090626+lfs/ &> /dev/null 
     1364      fi 
     1365      if [ -e "/var/backups/php53-20090626+lfs/geos.so" ] ; then 
     1366        mv -f /var/backups/php53-20090626+lfs/geos.so /usr/lib/php5/20090626+lfs/ &> /dev/null 
     1367      fi 
    13401368    fi 
    13411369    if [ -e "/etc/php5/conf.d" ] ; then 
    13421370      mkdir -p /var/backups/php53-conf-d 
    update_sql_conf () { 
    15931621  if [[ "$_THIS_DB_SERVER_TEST" =~ "MariaDB" ]] ; then 
    15941622    sed -i "s/.*innodb_lazy_drop_table /#innodb_lazy_drop_table /g" /etc/mysql/my.cnf &> /dev/null 
    15951623  fi 
     1624  if [[ "$_THISHOST" =~ ".host8." ]] ; then 
     1625    if [[ "$_THISHOST" =~ "ocean.ams.host8.biz" ]] || [[ "$_THISHOST" =~ "ocean.nyc.host8.biz" ]] ; then 
     1626      true 
     1627    else 
     1628      sed -i "s/^connect_timeout.*/connect_timeout         = 30/g"            /etc/mysql/my.cnf &> /dev/null 
     1629      sed -i "s/^join_buffer_size.*/join_buffer_size        = 2M/g"           /etc/mysql/my.cnf &> /dev/null 
     1630      sed -i "s/^max_connections.*/max_connections         = 80/g"            /etc/mysql/my.cnf &> /dev/null 
     1631      sed -i "s/^max_user_connections.*/max_user_connections    = 80/g"       /etc/mysql/my.cnf &> /dev/null 
     1632      sed -i "s/^query_cache_size.*/query_cache_size        = 256M/g"         /etc/mysql/my.cnf &> /dev/null 
     1633      sed -i "s/^read_rnd_buffer_size.*/read_rnd_buffer_size    = 8M/g"       /etc/mysql/my.cnf &> /dev/null 
     1634      sed -i "s/^tmp_table_size.*/tmp_table_size          = 128M/g"           /etc/mysql/my.cnf &> /dev/null 
     1635      sed -i "s/^max_heap_table_size.*/max_heap_table_size     = 256M/g"      /etc/mysql/my.cnf &> /dev/null 
     1636      sed -i "s/^myisam_sort_buffer_size.*/myisam_sort_buffer_size = 2048K/g" /etc/mysql/my.cnf &> /dev/null 
     1637    fi 
     1638  fi 
     1639  if [ "$_CUSTOM_CONFIG_SQL" = "NO" ] ; then 
     1640    if [ "$_DB_BINARY_LOG" = "NO" ] ; then 
     1641      bash /var/xdrago/purge_binlogs.sh &> /dev/null 
     1642      sed -i "s/.*purge_binlogs.*//g" /var/spool/cron/crontabs/root &> /dev/null 
     1643      sed -i "/^$/d" /var/spool/cron/crontabs/root &> /dev/null 
     1644      sed -i "s/^log_bin/#log_bin/g"                   /etc/mysql/my.cnf &> /dev/null 
     1645      sed -i "s/^expire_logs_days/#expire_logs_days/g" /etc/mysql/my.cnf &> /dev/null 
     1646      sed -i "s/^max_binlog_size/#max_binlog_size/g"   /etc/mysql/my.cnf &> /dev/null 
     1647    elif [ "$_DB_BINARY_LOG" = "YES" ] ; then 
     1648      sed -i "s/.*log_bin/log_bin/g"                   /etc/mysql/my.cnf &> /dev/null 
     1649      sed -i "s/.*expire_logs_days/expire_logs_days/g" /etc/mysql/my.cnf &> /dev/null 
     1650      sed -i "s/.*max_binlog_size/max_binlog_size/g"   /etc/mysql/my.cnf &> /dev/null 
     1651    fi 
     1652    if [ "$_DB_ENGINE" = "MyISAM" ] || [ "$_DB_ENGINE" = "InnoDB" ] ; then 
     1653      sed -i "s/^default_storage_engine.*/default_storage_engine  = $_DB_ENGINE/g" /etc/mysql/my.cnf &> /dev/null 
     1654    fi 
     1655  fi 
    15961656} 
    15971657# 
    15981658# Update Nginx Config. 
    update_nginx_conf () { 
    16071667    fi 
    16081668  fi 
    16091669  if [ -e "/var/aegir/config/server_master/nginx/pre.d" ] ; then 
    1610     if [ ! -e "/var/log/nginx-speed-purge-$_INSTALLER_VERSION" ] && [ "$_PURGE_MODE" = "ON" ] ; then 
    1611       cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/nginx_speed_purge.conf /var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf 
    1612       touch /var/log/nginx-speed-purge-$_INSTALLER_VERSION 
     1670    if [ "$_PURGE_MODE" = "ON" ] ; then 
     1671      if [ ! -e "/var/log/nginx-speed-purge-$_INSTALLER_VERSION" ] || [ ! -e "/var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf" ] ; then 
     1672        cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/nginx_speed_purge.conf /var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf 
     1673        touch /var/log/nginx-speed-purge-$_INSTALLER_VERSION 
     1674      fi 
    16131675    fi 
    16141676  fi 
    16151677} 
    fix_on_upgrade () { 
    16341696  cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/clean-boa-env /etc/init.d/clean-boa-env 
    16351697  chmod 755 /etc/init.d/clean-boa-env &> /dev/null 
    16361698  st_runner "update-rc.d clean-boa-env defaults" &> /dev/null 
    1637   set_xterm 
    16381699  kill_nash 
    16391700  fix_ftps_modern 
    16401701  fix_ftps_pam 
    sub_force_advanced_nginx_config () { 
    18531914      else 
    18541915        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null 
    18551916      fi 
     1917    else 
     1918      if [ "$_USE_STOCK" = "NO" ] ; then 
     1919        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null 
     1920      else 
     1921        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null 
     1922      fi 
    18561923    fi 
    18571924  fi 
    18581925} 
    force_advanced_nginx_config () { 
    18911958# Tune Web Sever configuration. 
    18921959tune_web_server_config () { 
    18931960  _LIM_FPM="$_L_PHP_FPM_WORKERS" 
    1894   if [ "$_LIM_FPM" -lt "6" ] ; then 
    1895     _LIM_FPM=6 
     1961  if [ "$_LIM_FPM" -lt "3" ] ; then 
     1962    _LIM_FPM=3 
     1963  fi 
     1964  let "_PROCESS_MAX_FPM = (($_LIM_FPM * 2))" 
     1965  let "_CHILD_MAX_FPM = (($_PROCESS_MAX_FPM - 2))" 
     1966  let "_START_FPM = (($_CHILD_MAX_FPM - 4))" 
     1967  if [ "$_START_FPM" -lt "2" ] ; then 
     1968    _START_FPM=2 
     1969  fi 
     1970  let "_START_LEGACY_FPM = (($_LIM_FPM / 3))" 
     1971  if [ "$_START_LEGACY_FPM" -lt "2" ] ; then 
     1972    _START_LEGACY_FPM=2 
    18961973  fi 
    1897   let "_START_FPM = (($_LIM_FPM / 2))" 
    18981974  if [ ! -z "$_START_FPM" ] ; then 
    1899     let "_PROCESS_MAX_FPM = (($_LIM_FPM * 2))" 
    1900     sed -i "s/max_children\">.*</max_children\">$_START_FPM</g"                /opt/etc/php-fpm.conf &> /dev/null 
    1901     sed -i "s/pm.max_children =.*/pm.max_children = $_LIM_FPM/g"               /opt/local/etc/php53-fpm.conf &> /dev/null 
     1975    sed -i "s/max_children\">.*</max_children\">$_START_LEGACY_FPM</g"         /opt/etc/php-fpm.conf &> /dev/null 
     1976    sed -i "s/pm.max_children =.*/pm.max_children = $_CHILD_MAX_FPM/g"         /opt/local/etc/php53-fpm.conf &> /dev/null 
    19021977    sed -i "s/pm.start_servers =.*/pm.start_servers = $_START_FPM/g"           /opt/local/etc/php53-fpm.conf &> /dev/null 
    19031978    sed -i "s/pm.max_spare_servers =.*/pm.max_spare_servers = $_START_FPM/g"   /opt/local/etc/php53-fpm.conf &> /dev/null 
    19041979    sed -i "s/process.max =.*/process.max = $_PROCESS_MAX_FPM/g"               /opt/local/etc/php53-fpm.conf &> /dev/null 
    tune_memory_limits () { 
    20132088        _USE_PHP=512 
    20142089        _USE_APC=256 
    20152090        if [ "$_PHP_FPM_WORKERS" = "AUTO" ] ; then 
    2016           _L_PHP_FPM_WORKERS=6 
     2091          _L_PHP_FPM_WORKERS=3 
    20172092        else 
    20182093          _L_PHP_FPM_WORKERS=$_PHP_FPM_WORKERS 
    20192094        fi 
    tune_memory_limits () { 
    20412116    _USE_PHP="$_USE" 
    20422117    _USE_APC="$_USE" 
    20432118    if [ "$_PHP_FPM_WORKERS" = "AUTO" ] ; then 
    2044       _L_PHP_FPM_WORKERS=6 
     2119      _L_PHP_FPM_WORKERS=3 
    20452120    else 
    20462121      _L_PHP_FPM_WORKERS=$_PHP_FPM_WORKERS 
    20472122    fi 
    tune_memory_limits () { 
    20812156  if [ -e "/etc/default/jetty7" ] && [ -e "/opt/solr1" ] ; then 
    20822157    sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=\/opt\/solr1 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty7 &> /dev/null 
    20832158  fi 
    2084   if [[ "$_THISHOST" =~ ".host8." ]] ; then 
    2085     if [[ "$_THISHOST" =~ "ocean.ams.host8.biz" ]] || [[ "$_THISHOST" =~ "ocean.nyc.host8.biz" ]] ; then 
    2086       true 
    2087     else 
    2088       sed -i "s/^connect_timeout.*/connect_timeout         = 30/g"            /etc/mysql/my.cnf &> /dev/null 
    2089       sed -i "s/^join_buffer_size.*/join_buffer_size        = 2M/g"           /etc/mysql/my.cnf &> /dev/null 
    2090       sed -i "s/^max_connections.*/max_connections         = 80/g"            /etc/mysql/my.cnf &> /dev/null 
    2091       sed -i "s/^max_user_connections.*/max_user_connections    = 80/g"       /etc/mysql/my.cnf &> /dev/null 
    2092       sed -i "s/^query_cache_size.*/query_cache_size        = 256M/g"         /etc/mysql/my.cnf &> /dev/null 
    2093       sed -i "s/^read_rnd_buffer_size.*/read_rnd_buffer_size    = 8M/g"       /etc/mysql/my.cnf &> /dev/null 
    2094       sed -i "s/^tmp_table_size.*/tmp_table_size          = 128M/g"           /etc/mysql/my.cnf &> /dev/null 
    2095       sed -i "s/^max_heap_table_size.*/max_heap_table_size     = 256M/g"      /etc/mysql/my.cnf &> /dev/null 
    2096       sed -i "s/^myisam_sort_buffer_size.*/myisam_sort_buffer_size = 2048K/g" /etc/mysql/my.cnf &> /dev/null 
    2097     fi 
    2098   fi 
    2099   if [ "$_CUSTOM_CONFIG_SQL" = "NO" ] ; then 
    2100     if [ "$_DB_BINARY_LOG" = "NO" ] ; then 
    2101       sed -i "s/.*purge_binlogs.*//g" /var/spool/cron/crontabs/root &> /dev/null 
    2102       sed -i "/^$/d" /var/spool/cron/crontabs/root &> /dev/null 
    2103       sed -i "s/^log_bin/#log_bin/g"                   /etc/mysql/my.cnf &> /dev/null 
    2104       sed -i "s/^expire_logs_days/#expire_logs_days/g" /etc/mysql/my.cnf &> /dev/null 
    2105       sed -i "s/^max_binlog_size/#max_binlog_size/g"   /etc/mysql/my.cnf &> /dev/null 
    2106     elif [ "$_DB_BINARY_LOG" = "YES" ] ; then 
    2107       sed -i "s/.*log_bin/log_bin/g"                   /etc/mysql/my.cnf &> /dev/null 
    2108       sed -i "s/.*expire_logs_days/expire_logs_days/g" /etc/mysql/my.cnf &> /dev/null 
    2109       sed -i "s/.*max_binlog_size/max_binlog_size/g"   /etc/mysql/my.cnf &> /dev/null 
    2110     fi 
    2111     if [ "$_DB_ENGINE" = "MyISAM" ] || [ "$_DB_ENGINE" = "InnoDB" ] ; then 
    2112       sed -i "s/^default_storage_engine.*/default_storage_engine  = $_DB_ENGINE/g" /etc/mysql/my.cnf &> /dev/null 
    2113     fi 
    2114   fi 
    21152159  tune_web_server_config 
    21162160} 
    21172161# 
    21182162# Fix locales. 
    21192163fix_locales () { 
     2164  _LOCALE_TEST=BROKEN 
    21202165  _LOC_TEST=`locale 2>&1` 
     2166  if [[ "$_LOC_TEST" =~ LANGUAGE=.*UTF-8 ]] && [[ "$_LOC_TEST" =~ LANG=.*UTF-8 ]] ; then 
     2167    _LOCALE_TEST=OK 
     2168  fi 
    21212169  if [[ "$_LOC_TEST" =~ "Cannot" ]] ; then 
    21222170    _LOCALE_TEST=BROKEN 
     2171  fi 
     2172  if [ "$_LOCALE_TEST" = "BROKEN" ] ; then 
    21232173    msg "WARNING!" 
    21242174    cat <<EOF 
    21252175 
    21262176  Locales on this system are broken or not installed 
    2127   and/or not configured correctly yet. This is "default" 
    2128   issue at RackSpaceCloud (and maybe others). 
     2177  and/or not configured correctly yet. This is a known 
     2178  issue on some systems/hosts which either don't configure 
     2179  locales at all or don't use UTF-8 compatible locales 
     2180  during initial OS setup. 
    21292181 
    21302182  We will fix this problem for you now, so you shouldn't 
    21312183  use any tricks to change system/ssh settings before 
    2132   running this Barracuda installer. 
     2184  running this installer. 
    21332185 
    21342186  You can experience problems if your SSH client 
    21352187  forces locales other than en_US.UTF-8 we are using by default. 
    21362188 
    2137   You should log out when Barracuda will finish all its tasks 
     2189  You should log out when this installer will finish all its tasks 
    21382190  and display last line with "BYE!" and then log in again 
    2139   to see the result (and possibly run Octopus installer). 
     2191  to see the result. 
    21402192 
    2141   We will continue in 10 seconds... 
     2193  We will continue in 5 seconds... 
    21422194 
    21432195EOF 
    2144     sleep 10 
     2196    sleep 5 
    21452197    locale-gen en_US en_US.UTF-8 &> /dev/null 
    21462198    update-locale &> /dev/null 
    21472199    localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 &> /dev/null 
    21482200    echo "LANG=en_US.UTF-8" > /etc/default/locale 
    2149     export LANG=en_US.UTF-8 
    2150     export LC_ALL=en_US.UTF-8 
    2151     export LANGUAGE=en_US.UTF-8 
     2201    if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/boa.bashrc.txt" ] ; then 
     2202      cp -af /root/.bashrc /root/.bashrc.bak.$_NOW 
     2203      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/boa.bashrc.txt /root/.bashrc 
     2204      set_xterm 
     2205    fi 
    21522206    echo "export LANG=en_US.UTF-8" >> /root/.bashrc 
    2153     echo "export LC_ALL=en_US.UTF-8" >> /root/.bashrc 
    21542207    echo "export LANGUAGE=en_US.UTF-8" >> /root/.bashrc 
     2208    echo "export LC_ALL=\"\"" >> /root/.bashrc 
     2209    export LANG=en_US.UTF-8 
     2210    export LANGUAGE=en_US.UTF-8 
     2211    export LC_ALL="" 
    21552212  else 
    2156     _LOCALE_TEST=OK 
     2213    if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/boa.bashrc.txt" ] ; then 
     2214      cp -af /root/.bashrc /root/.bashrc.bak.$_NOW 
     2215      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/boa.bashrc.txt /root/.bashrc 
     2216      set_xterm 
     2217    fi 
    21572218    locale-gen en_US en_US.UTF-8 &> /dev/null 
     2219    update-locale &> /dev/null 
    21582220    localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 &> /dev/null 
    21592221  fi 
    21602222} 
    barracuda_cnf () { 
    22722334        sed -i "s/^_DEBUG_MODE=.*/_DEBUG_MODE=YES/g"                                  /root/.barracuda.cnf &> /dev/null 
    22732335        sed -i "s/^_FORCE_GIT_MIRROR=.*/_FORCE_GIT_MIRROR=\"\"/g"                     /root/.barracuda.cnf &> /dev/null 
    22742336        sed -i "s/^_LOCAL_DEBIAN_MIRROR=.*/_LOCAL_DEBIAN_MIRROR=\"ftp.debian.org\"/g" /root/.barracuda.cnf &> /dev/null 
     2337        sed -i "s/^_MY_EMAIL=.*/_MY_EMAIL=\"notify\@omega8.cc\"/g"                    /root/.barracuda.cnf &> /dev/null 
    22752338        sed -i "s/^_STRONG_PASSWORDS=.*/_STRONG_PASSWORDS=YES/g"                      /root/.barracuda.cnf &> /dev/null 
    22762339        sed -i "s/^_USE_STOCK=.*/_USE_STOCK=NO/g"                                     /root/.barracuda.cnf &> /dev/null 
    22772340        sed -i "s/^_FORCE_GIT_MIRROR=.*/_FORCE_GIT_MIRROR=\"\"/g"                     /root/.*.octopus.cnf &> /dev/null 
    barracuda_cnf () { 
    25292592        sed -i "s/^_DEBUG_MODE=.*/_DEBUG_MODE=YES/g"                                  /root/.barracuda.cnf &> /dev/null 
    25302593        sed -i "s/^_FORCE_GIT_MIRROR=.*/_FORCE_GIT_MIRROR=\"\"/g"                     /root/.barracuda.cnf &> /dev/null 
    25312594        sed -i "s/^_LOCAL_DEBIAN_MIRROR=.*/_LOCAL_DEBIAN_MIRROR=\"ftp.debian.org\"/g" /root/.barracuda.cnf &> /dev/null 
     2595        sed -i "s/^_MY_EMAIL=.*/_MY_EMAIL=\"notify\@omega8.cc\"/g"                    /root/.barracuda.cnf &> /dev/null 
    25322596        sed -i "s/^_STRONG_PASSWORDS=.*/_STRONG_PASSWORDS=YES/g"                      /root/.barracuda.cnf &> /dev/null 
    25332597        sed -i "s/^_USE_STOCK=.*/_USE_STOCK=NO/g"                                     /root/.barracuda.cnf &> /dev/null 
    25342598        sed -i "s/^_FORCE_GIT_MIRROR=.*/_FORCE_GIT_MIRROR=\"\"/g"                     /root/.*.octopus.cnf &> /dev/null 
    25352599        sed -i "s/^_STRONG_PASSWORDS=.*/_STRONG_PASSWORDS=YES/g"                      /root/.*.octopus.cnf &> /dev/null 
    25362600        sed -i "s/^_USE_STOCK=.*/_USE_STOCK=NO/g"                                     /root/.*.octopus.cnf &> /dev/null 
     2601        ### 
     2602        sed -i "s/^_PHP_CLI_VERSION=.*/_PHP_CLI_VERSION=5.3/g"                        /root/.barracuda.cnf &> /dev/null 
     2603        sed -i "s/^_PHP_FPM_VERSION=.*/_PHP_FPM_VERSION=5.3/g"                        /root/.barracuda.cnf &> /dev/null 
     2604        sed -i "s/^_PHP_MODERN_ONLY=.*/_PHP_MODERN_ONLY=YES/g"                        /root/.barracuda.cnf &> /dev/null 
     2605        sed -i "s/^_PHP_CLI_VERSION=.*/_PHP_CLI_VERSION=5.3/g"                        /root/.*.octopus.cnf &> /dev/null 
     2606        sed -i "s/^_PHP_FPM_VERSION=.*/_PHP_FPM_VERSION=5.3/g"                        /root/.*.octopus.cnf &> /dev/null 
     2607        sed -i "s/^_PHP_MODERN_ONLY=.*/_PHP_MODERN_ONLY=YES/g"                        /root/.*.octopus.cnf &> /dev/null 
     2608        ### 
    25372609      fi 
    25382610    fi 
    2539     sed -i "s/^_PHP_CLI_VERSION=.*/_PHP_CLI_VERSION=5.3/g"                            /root/.barracuda.cnf &> /dev/null 
    2540     sed -i "s/^_PHP_FPM_VERSION=.*/_PHP_FPM_VERSION=5.3/g"                            /root/.barracuda.cnf &> /dev/null 
    2541     sed -i "s/^_PHP_MODERN_ONLY=.*/_PHP_MODERN_ONLY=YES/g"                            /root/.barracuda.cnf &> /dev/null 
    2542     sed -i "s/^_PHP_CLI_VERSION=.*/_PHP_CLI_VERSION=5.3/g"                            /root/.*.octopus.cnf &> /dev/null 
    2543     sed -i "s/^_PHP_FPM_VERSION=.*/_PHP_FPM_VERSION=5.3/g"                            /root/.*.octopus.cnf &> /dev/null 
    2544     sed -i "s/^_PHP_MODERN_ONLY=.*/_PHP_MODERN_ONLY=YES/g"                            /root/.*.octopus.cnf &> /dev/null 
    25452611    echo " " 
    25462612    while read line ; do 
    25472613      echo "$line" 
    run_apt_update_again () { 
    26202686    echo "fixed-mytop-mariadb" > /var/log/fixed-mytop-mariadb.log 
    26212687  fi 
    26222688  st_runner "aptitude -f -y -q -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold full-upgrade" 2> /dev/null 
     2689  if [[ "$_THIS_DB_SERVER_TEST" =~ "MariaDB" ]] && [ -e "/var/log/fixed-mytop-mariadb.log" ] ; then 
     2690    st_runner "$_INSTAPP mytop" 2> /dev/null 
     2691  fi 
    26232692} 
    26242693# 
    26252694# Install IonCube. 
    install_libmemcached () { 
    26692738  fi 
    26702739} 
    26712740# 
    2672 # Install extensions for PHP universal. 
    2673 install_php_extensions () { 
     2741# Install extensions for PHP built from sources. 
     2742install_php_scr_build_extensions () { 
    26742743  ###--------------------### 
    26752744  msg "INFO: Installing APC for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    26762745  mrun "sleep 1" 
    install_php_extensions () { 
    27012770  if [ "$_USE_MEMCACHED" = "YES" ] ; then 
    27022771    msg "INFO: Installing memcached for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    27032772    mrun "sleep 1" 
    2704     if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     2773    if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    27052774      st_runner "$_INSTAPP libcloog-ppl0" 2> /dev/null 
    27062775    fi 
    27072776    if [ "$_FROM_SOURCES" = "NO" ] ; then 
    install_php_extensions () { 
    27242793  fi 
    27252794} 
    27262795# 
    2727 # Install more extensions for PHP universal. 
    2728 install_php_extensions_more () { 
     2796# Install extensions for PHP installed from packages or built from sources. 
     2797install_php_universal_extensions () { 
    27292798  ###--------------------### 
    27302799  msg "INFO: Installing PhpRedis for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    27312800  mrun "sleep 1" 
    install_php_extensions_more () { 
    27502819  st_runner "sh ./configure --with-php-config=$_LOC_PHP_PATH/php-config" 2> /dev/null 
    27512820  st_runner "make --quiet" 2> /dev/null 
    27522821  st_runner "make --quiet install" 2> /dev/null 
     2822  echo "uploadprogress $_LOC_PHP_VERSION $_NOW" > /var/log/uploadprogress-$_LOC_PHP_VERSION.log 
    27532823  ###--------------------### 
    27542824  msg "INFO: Installing JSMin for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    27552825  mrun "sleep 1" 
    install_php_extensions_more () { 
    27652835  echo "php-jsmin $_LOC_PHP_VERSION $_NOW" > /var/log/php-jsmin-$_LOC_PHP_VERSION.log 
    27662836  ###--------------------### 
    27672837  if [ "$_PHP_GEOS" = "YES" ] || [[ "$_XTRAS_LIST" =~ "GEO" ]] ; then 
    2768     if [ "$_LOC_PHP_VERSION" = "$_PHP_VERSION_NEW" ] && [ ! -e "/var/log/php-geos-$_LOC_PHP_VERSION.log" ] ; then 
     2838    if [ "$_LOC_PHP_VERSION" = "$_PHP_VERSION_NEW" ] ; then 
    27692839      msg "INFO: Installing GEOS PHP extension for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    27702840      mrun "sleep 1" 
    27712841      if [ ! -e "/var/log/geos-$_INSTALLER_VERSION.log" ] ; then 
    install_php_extensions_more () { 
    27882858  fi 
    27892859  ###--------------------### 
    27902860  if [ "$_PHP_MONGODB" = "YES" ] || [[ "$_XTRAS_LIST" =~ "MNG" ]] ; then 
    2791     if [ "$_LOC_PHP_VERSION" = "$_PHP_VERSION_NEW" ] && [ ! -e "/var/log/php-mongo-$_LOC_PHP_VERSION.log" ] ; then 
     2861    if [ "$_LOC_PHP_VERSION" = "$_PHP_VERSION_NEW" ] ; then 
    27922862      msg "INFO: Installing MongoDB PHP driver for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    27932863      mrun "sleep 1" 
    27942864      cd /var/opt 
    install_php_extensions_more () { 
    28052875  fi 
    28062876} 
    28072877# 
    2808 # Update PHP universal. 
    2809 update_php_universal () { 
     2878# Update extensions for PHP built from sources. 
     2879update_php_scr_build_extensions () { 
    28102880  ###--------------------### 
    28112881  if [ ! -e "/var/log/apc-$_APC_VERSION-$_LOC_PHP_VERSION.log" ] ; then 
    28122882    msg "INFO: Installing APC upgrade for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    update_php_universal () { 
    28572927      fi 
    28582928    fi 
    28592929  fi 
    2860   ###--------------------### 
    2861   if [ ! -e "/var/log/php-jsmin-$_LOC_PHP_VERSION.log" ] ; then 
    2862     msg "INFO: Installing JSMin upgrade for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    2863     mrun "sleep 1" 
    2864     cd /var/opt 
    2865     rm -f -r php-jsmin* 
    2866     wget -q -U iCab http://files.aegir.cc/dev/php-jsmin-1.0.tgz 
    2867     tar -xzf php-jsmin-1.0.tgz 
    2868     cd /var/opt/php-jsmin-1.0 
    2869     st_runner "$_LOC_PHP_PATH/phpize" 2> /dev/null 
    2870     st_runner "sh ./configure --with-php-config=$_LOC_PHP_PATH/php-config" 2> /dev/null 
    2871     st_runner "make --quiet" 2> /dev/null 
    2872     st_runner "make --quiet install" 2> /dev/null 
    2873     echo "php-jsmin $_LOC_PHP_VERSION $_NOW" > /var/log/php-jsmin-$_LOC_PHP_VERSION.log 
    2874   fi 
    28752930} 
    28762931# 
    2877 # Update PHP universal more. 
    2878 update_php_universal_more () { 
     2932# Update extensions for PHP installed from packages or built from sources. 
     2933update_php_universal_extensions () { 
    28792934  ###--------------------### 
    28802935  if [ ! -e "/var/log/phpredis-$_LOC_PHP_VERSION.log" ] ; then 
    28812936    msg "INFO: Installing PhpRedis upgrade for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    update_php_universal_more () { 
    28912946    echo "phpredis $_LOC_PHP_VERSION $_NOW" > /var/log/phpredis-$_LOC_PHP_VERSION.log 
    28922947  fi 
    28932948  ###--------------------### 
     2949  if [ ! -e "/var/log/uploadprogress-$_LOC_PHP_VERSION.log" ] ; then 
     2950    msg "INFO: Installing UploadProgress upgrade for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
     2951    mrun "sleep 1" 
     2952    cd /var/opt 
     2953    rm -f -r uploadprogress* 
     2954    wget -q -U iCab http://files.aegir.cc/dev/uploadprogress-1.0.1.tgz 
     2955    tar -xzf uploadprogress-1.0.1.tgz 
     2956    cd /var/opt/uploadprogress-1.0.1 
     2957    st_runner "$_LOC_PHP_PATH/phpize" 2> /dev/null 
     2958    st_runner "sh ./configure --with-php-config=$_LOC_PHP_PATH/php-config" 2> /dev/null 
     2959    st_runner "make --quiet" 2> /dev/null 
     2960    st_runner "make --quiet install" 2> /dev/null 
     2961    echo "uploadprogress $_LOC_PHP_VERSION $_NOW" > /var/log/uploadprogress-$_LOC_PHP_VERSION.log 
     2962  fi 
     2963  ###--------------------### 
    28942964  if [ ! -e "/var/log/php-jsmin-$_LOC_PHP_VERSION.log" ] ; then 
    28952965    msg "INFO: Installing JSMin upgrade for PHP-FPM $_LOC_PHP_VERSION, please wait..." 
    28962966    mrun "sleep 1" 
    update_php_universal_more () { 
    29473017  fi 
    29483018} 
    29493019# 
    2950 # Install PHP 5.3.23 
     3020# Install modern PHP version 
    29513021install_php_modern () { 
    29523022  ###--------------------### 
    29533023  if [ "$_FROM_SOURCES" = "NO" ] ; then 
    install_php_modern () { 
    29813051      patch -p1 < $_FPM_PATCH &> /dev/null 
    29823052    fi 
    29833053    st_runner "sh ./buildconf --force" 2> /dev/null 
    2984     if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     3054    if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    29853055      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/patches/disable_SSLv2_for_openssl_1_0_0.patch ./ 
    29863056      patch -p1 < disable_SSLv2_for_openssl_1_0_0.patch &> /dev/null 
    29873057    fi 
    install_php_modern () { 
    30263096    elif [ -x "/opt/local/bin/phpize" ] ; then 
    30273097      _LOC_PHP_PATH=/opt/local/bin 
    30283098    fi 
    3029     install_php_extensions 
     3099    install_php_scr_build_extensions 
    30303100  fi 
    3031   install_php_extensions_more 
     3101  install_php_universal_extensions 
    30323102  _THIS_DB_SERVER_TEST=`mysql -V 2>&1` 
    30333103  if [[ "$_THIS_DB_SERVER_TEST" =~ "MariaDB" ]] ; then 
    30343104    echo "$_MARIADB_VERSION-MariaDB" > /var/log/installed-$_MARIADB_VERSION-MariaDB.log 
    install_php_modern () { 
    30453115  st_runner "update-rc.d php53-fpm defaults" &> /dev/null 
    30463116} 
    30473117# 
    3048 # Install PHP 5.2.17 
     3118# Install legacy PHP version 
    30493119install_php_legacy () { 
    30503120  ###--------------------### 
    30513121  msg "INFO: Installing PHP-FPM $_PHP_VERSION" 
    install_php_legacy () { 
    30633133  mrun "sleep 1" 
    30643134  cd /var/opt/php-$_PHP_VERSION 
    30653135  st_runner "sh ./buildconf --force" 2> /dev/null 
    3066   if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     3136  if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    30673137    cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/patches/disable_SSLv2_for_openssl_1_0_0.patch ./ 
    30683138    patch -p1 < disable_SSLv2_for_openssl_1_0_0.patch &> /dev/null 
    30693139  fi 
    install_php_legacy () { 
    30763146  st_runner "make --quiet install" 2> /dev/null 
    30773147  _LOC_PHP_VERSION="$_PHP_VERSION" 
    30783148  _LOC_PHP_PATH=/usr/local/bin 
    3079   install_php_extensions 
    3080   install_php_extensions_more 
     3149  install_php_scr_build_extensions 
     3150  install_php_universal_extensions 
    30813151  echo "libcurl4-openssl-dev" > /var/log/libcurl4-openssl-dev.log 
    30823152  _THIS_DB_SERVER_TEST=`mysql -V 2>&1` 
    30833153  if [[ "$_THIS_DB_SERVER_TEST" =~ "MariaDB" ]] ; then 
    install_php_legacy () { 
    30923162  chmod 755 /usr/local/sbin/php-fpm &> /dev/null 
    30933163} 
    30943164# 
    3095 # Update PHP 5.3.23 
     3165# Update modern PHP version 
    30963166update_php_modern () { 
    30973167  _LOC_PHP_VERSION="$_PHP_VERSION_NEW" 
    30983168  if [ "$_FROM_SOURCES" = "NO" ] ; then 
    30993169    _LOC_PHP_PATH=/usr/bin 
    3100     update_php_universal_more 
    31013170  else 
    31023171    if [ -x "/usr/bin/phpize" ] ; then 
    31033172      _LOC_PHP_PATH=/usr/bin 
    31043173    elif [ -x "/opt/local/bin/phpize" ] ; then 
    31053174      _LOC_PHP_PATH=/opt/local/bin 
    31063175    fi 
    3107     update_php_universal 
    3108     update_php_universal_more 
     3176    update_php_scr_build_extensions 
    31093177  fi 
     3178  update_php_universal_extensions 
    31103179} 
    31113180# 
    3112 # Update PHP 5.2.17 
     3181# Update legacy PHP version 
    31133182update_php_legacy () { 
    31143183  _LOC_PHP_VERSION="$_PHP_VERSION" 
    31153184  _LOC_PHP_PATH=/usr/local/bin 
    3116   update_php_universal 
     3185  update_php_scr_build_extensions 
     3186  update_php_universal_extensions 
    31173187} 
    31183188# 
    31193189# Install latest Git. 
    check_apt_updates () { 
    31453215  for Update in `/usr/bin/apt-get -q -y --allow-unauthenticated -s dist-upgrade | grep ^Inst | cut -d\  -f2 | sort` 
    31463216  do 
    31473217    case $Update in 
    3148       *linux-*)     _UP_LNX=YES ;; 
    31493218      *libcurl*)    _UP_PHP=YES ;; 
    31503219      *libmysql*)   _UP_PHP=YES ;; 
    31513220      *libssl*)     _UP_PHP=YES ;; 
     3221      *linux-*)     _UP_LNX=YES ;; 
    31523222      *mariadb*)    _UP_PHP=YES ;; 
     3223      *newrelic*)   _UP_NRC=YES ;; 
    31533224      *nginx*)      _UP_NGX=YES ;; 
    31543225      *openjdk*)    _UP_JDK=YES ;; 
    31553226      *openssl*)    _UP_PHP=YES ;; 
    check_apt_updates () { 
    31603231  done 
    31613232} 
    31623233# 
    3163 # Generate new secure password. 
    3164 main_dbuser_reborn () { 
     3234# Generate provision backend db_passwd. 
     3235provision_backend_dbpass_generate () { 
    31653236  _ESC_APASS="" 
    31663237  _LEN_APASS=0 
    31673238  if [ "$_STRONG_PASSWORDS" = "YES" ] ; then 
    main_dbuser_reborn () { 
    31863257    msg "FATAL ERROR:: Aborting Barracuda installer NOW!" 
    31873258    touch /opt/tmp/status-Barracuda-FAIL 
    31883259    exit 1 
    3189   else 
    3190     _AEGIR_HOST_IP="$_RESOLVEIP" 
    31913260  fi 
    31923261mysql -uroot mysql<<EOFMYSQL 
    31933262GRANT ALL PRIVILEGES ON *.* TO '$_ADBU'@'$_AEGIR_HOST' IDENTIFIED BY '$_ESC_APASS' WITH GRANT OPTION; 
    3194 GRANT ALL PRIVILEGES ON *.* TO '$_ADBU'@'$_AEGIR_HOST_IP' IDENTIFIED BY '$_ESC_APASS' WITH GRANT OPTION; 
     3263GRANT ALL PRIVILEGES ON *.* TO '$_ADBU'@'$_RESOLVEIP' IDENTIFIED BY '$_ESC_APASS' WITH GRANT OPTION; 
    31953264GRANT ALL PRIVILEGES ON *.* TO '$_ADBU'@'localhost' IDENTIFIED BY '$_ESC_APASS' WITH GRANT OPTION; 
    31963265EOFMYSQL 
     3266mysqladmin flush-privileges &> /dev/null 
     3267} 
     3268# 
     3269# Sync provision backend db_passwd. 
     3270provision_backend_dbpass_sync () { 
     3271  msg "INFO: Syncing provision backend db_passwd, please wait..." 
     3272  mrun "sleep 1" 
     3273  _ADBU=aegir_root 
     3274  _L_SYS="/var/aegir/backups/system/.$_ADBU.pass.txt" 
     3275  mv -f $_L_SYS $_L_SYS-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
     3276  provision_backend_dbpass_generate 
     3277  if [ ! -z "$_ESC_APASS" ] && [ ! -z "$_ENC_APASS" ] ; then 
     3278    su -s /bin/bash - aegir -c "drush @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_APASS' WHERE db_user='$_ADBU'\" &> /dev/null" 
     3279    mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_APASS') WHERE User='$_ADBU';" &> /dev/null 
     3280    sed -i "s/mysql:\/\/$_ADBU:.*/mysql:\/\/$_ADBU:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_localhost.alias.drushrc.php &> /dev/null 
     3281    sed -i "s/mysql:\/\/$_ADBU:.*/mysql:\/\/$_ADBU:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_master.alias.drushrc.php &> /dev/null 
     3282  fi 
     3283  mysqladmin flush-privileges &> /dev/null 
     3284  if [ "$_USE_STOCK" = "YES" ] || [ "$_DRUSH_CC_REQ" = "YES" ] ; then 
     3285    su -s /bin/bash - aegir -c "drush cache-clear drush &> /dev/null" 
     3286  fi 
     3287  if [ -e "/var/aegir/.drush/server_localhost.alias.drushrc.php" ] ; then 
     3288    su -s /bin/bash aegir -c "drush @hostmaster hosting-task @server_localhost verify --force &> /dev/null" 
     3289  else 
     3290    su -s /bin/bash aegir -c "drush @hostmaster hosting-task @server_master verify --force &> /dev/null" 
     3291  fi 
     3292  msg "INFO: Running hosting-dispatch (1/3), please wait..." 
     3293  su -s /bin/bash - aegir -c "drush @hostmaster hosting-dispatch &> /dev/null" 
     3294  mrun "sleep 5" 
     3295  msg "INFO: Running hosting-dispatch (2/3), please wait..." 
     3296  su -s /bin/bash - aegir -c "drush @hostmaster hosting-dispatch &> /dev/null" 
     3297  mrun "sleep 5" 
     3298  msg "INFO: Running hosting-dispatch (3/3), please wait..." 
     3299  su -s /bin/bash - aegir -c "drush @hostmaster hosting-dispatch &> /dev/null" 
     3300} 
     3301# 
     3302# Sync hostmaster frontend db_passwd. 
     3303hostmaster_frontend_dbpass_sync () { 
     3304  msg "INFO: Syncing hostmaster frontend db_passwd, please wait..." 
     3305  mrun "sleep 1" 
     3306  _THIS_HM_SPTH=`cat /var/aegir/.drush/hostmaster.alias.drushrc.php | grep "site_path'" | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,']//g"` 
     3307  _THIS_HM_DBUR=`cat $_THIS_HM_SPTH/drushrc.php | grep "options\['db_user'\] = " | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,';]//g"` 
     3308  _THIS_HM_DBPD=`cat $_THIS_HM_SPTH/drushrc.php | grep "options\['db_passwd'\] = " | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,';]//g"` 
     3309  if [ -e "$_THIS_HM_SPTH" ] && [ ! -z "$_THIS_HM_DBUR" ] && [ ! -z "$_THIS_HM_DBPD" ] ; then 
     3310    mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_THIS_HM_DBPD') WHERE User='$_THIS_HM_DBUR';" &> /dev/null 
     3311  fi 
     3312  mysqladmin flush-privileges &> /dev/null 
    31973313} 
    31983314# 
    31993315# Upgrade Aegir Master Instance. 
    upgrade_aegir_master () { 
    32373353    sed -i "s/EDIT_STRONG_PASSWORDS/$_STRONG_PASSWORDS/g"   /var/aegir/AegirUpgrade.sh.txt &> /dev/null 
    32383354    sed -i "s/EDIT_THIS_DB_HOST/$_THIS_DB_HOST/g"           /var/aegir/AegirUpgrade.sh.txt &> /dev/null 
    32393355    sed -i "s/EDIT_USE_STOCK/$_USE_STOCK/g"                 /var/aegir/AegirUpgrade.sh.txt &> /dev/null 
     3356    mysqladmin flush-hosts &> /dev/null 
     3357    provision_backend_dbpass_sync 
     3358    hostmaster_frontend_dbpass_sync 
    32403359    su -s /bin/bash - aegir -c "bash AegirUpgrade.sh.txt" 
    32413360    if [ -e "/opt/tmp/status-AegirUpgrade-FAIL" ] ; then 
    32423361      msg "FATAL ERROR: AegirUpgrade installer failed" 
    upgrade_aegir_master () { 
    32443363      touch /opt/tmp/status-Barracuda-FAIL 
    32453364      exit 1 
    32463365    else 
    3247       _ADBU=aegir_root 
    3248       _L_SYS="/var/aegir/backups/system/.$_ADBU.pass.txt" 
    3249       mv -f $_L_SYS $_L_SYS-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
    3250       main_dbuser_reborn 
    3251       if [ ! -z "$_ESC_APASS" ] ; then 
    3252         su -s /bin/bash - aegir -c "drush @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_APASS' WHERE db_user='$_ADBU'\" &> /dev/null" 
    3253         mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    3254         mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_APASS') WHERE User='$_ADBU';" &> /dev/null 
    3255         mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    3256         sed -i "s/mysql:\/\/$_ADBU:.*/mysql:\/\/$_ADBU:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_localhost.alias.drushrc.php &> /dev/null 
    3257         sed -i "s/mysql:\/\/$_ADBU:.*/mysql:\/\/$_ADBU:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_master.alias.drushrc.php &> /dev/null 
    3258         if [ "$_USE_STOCK" = "YES" ] || [ "$_DRUSH_CC_REQ" = "YES" ] ; then 
    3259           su -s /bin/bash - aegir -c "drush cache-clear drush &> /dev/null" 
    3260         fi 
    3261         if [ -e "/var/aegir/.drush/server_localhost.alias.drushrc.php" ] ; then 
    3262           su -s /bin/bash aegir -c "drush @hostmaster hosting-task @server_localhost verify --force &> /dev/null" 
    3263         else 
    3264           su -s /bin/bash aegir -c "drush @hostmaster hosting-task @server_master verify --force &> /dev/null" 
    3265         fi 
    3266         msg "INFO: Running hosting-dispatch (1/3), please wait..." 
    3267         su -s /bin/bash - aegir -c "drush @hostmaster hosting-dispatch &> /dev/null" 
    3268         mrun "sleep 5" 
    3269         msg "INFO: Running hosting-dispatch (2/3), please wait..." 
    3270         su -s /bin/bash - aegir -c "drush @hostmaster hosting-dispatch &> /dev/null" 
    3271         mrun "sleep 5" 
    3272         msg "INFO: Running hosting-dispatch (3/3), please wait..." 
    3273         su -s /bin/bash - aegir -c "drush @hostmaster hosting-dispatch &> /dev/null" 
    3274       fi 
     3366      hostmaster_frontend_dbpass_sync 
     3367      sed -i "s/hosting-dispatch.*/hosting-dispatch \>\/dev\/null 2\>\&1/g" /var/spool/cron/crontabs/aegir &> /dev/null 
    32753368    fi 
    3276     mv -f /var/aegir/config/includes/global.inc /var/aegir/config/includes/global.inc-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
     3369    if [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/var/aegir/config/includes/global.inc" ] ; then 
     3370      mv -f /var/aegir/config/includes/global.inc /var/aegir/config/includes/global.inc-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
     3371    fi 
     3372    mkdir -p /data/conf 
    32773373    if [ -e "/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf" ] ; then 
    3278       cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /var/aegir/config/includes/global.inc 
     3374      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /data/conf/global.inc 
    32793375    else 
    3280       cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.aegir.txt /var/aegir/config/includes/global.inc 
     3376      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.aegir.txt /data/conf/global.inc 
     3377    fi 
     3378    sed -i "s/3600/$_SPEED_VALID_MAX/g" /data/conf/global.inc &> /dev/null 
     3379    if [ -e "/var/aegir/config/includes" ] && [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/data/conf/global.inc" ] ; then 
     3380      rm -f /var/aegir/config/includes/global.inc 
     3381      ln -s /data/conf/global.inc /var/aegir/config/includes/global.inc 
    32813382    fi 
    3282     sed -i "s/3600/$_SPEED_VALID_MAX/g" /var/aegir/config/includes/global.inc &> /dev/null 
    32833383    update_redis_password 
    32843384    force_advanced_nginx_config 
    32853385    if [ "$_DRUSH_VERSION" = "7.x-4.5" ] || [ "$_DRUSH_VERSION" = "4.6-dev" ] ; then 
    upgrade_aegir_master () { 
    33133413  rm -f /var/aegir/*install.sh.txt 
    33143414} 
    33153415# 
     3416# Check for Linux/Cdorked.A malware and delete if discovered. 
     3417detect_cdorked_malware () { 
     3418  _C_DORKED=NO 
     3419  _C_FILE=/opt/tmp/$_BOA_REPO_NAME/aegir/helpers/dump_cdorked_config.c 
     3420  if [ -e "$_C_FILE" ] ; then 
     3421    msg "INFO: Checking for Linux/Cdorked.A malware, please wait..." 
     3422    mrun "sleep 1" 
     3423    chattr -ai $(which nginx) &> /dev/null 
     3424    cd /var/backups 
     3425    rm -f -r /var/opt/foo_bar* 
     3426    gcc -o /var/opt/foo_bar /opt/tmp/$_BOA_REPO_NAME/aegir/helpers/dump_cdorked_config.c &> /dev/null 
     3427    _C_DORKED_TEST=$(/var/opt/foo_bar) 
     3428    if [[ "$_C_DORKED_TEST" =~ "No shared memory matching Cdorked signature was found" ]] ; then 
     3429      msg "INFO: No Linux/Cdorked.A malware traces found - system clean" 
     3430    else 
     3431      msg "ALRT: Your system is probably infected by Linux/Cdorked.A malware!" 
     3432      msg "ALRT: Please send /var/backups/httpd_cdorked_config.bin file to leveille@eset.com" 
     3433      rm -f $(which nginx) 
     3434      _NGX_FORCE_REINSTALL=YES 
     3435      _C_DORKED=YES 
     3436    fi 
     3437  fi 
     3438} 
     3439# 
    33163440# Install or upgrade Nginx. 
    33173441install_upgrade_nginx () { 
    33183442  msg "INFO: Testing Nginx version..." 
    install_upgrade_nginx () { 
    33203444  if [ "$_STATUS" = "UPGRADE" ] ; then 
    33213445    _NGINX_INSTALL_REQUIRED=NO 
    33223446  fi 
    3323   _NGINX_EXTRA_CTRL="/var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf" 
    33243447  if [ -x "/usr/sbin/nginx" ] ; then 
    33253448    _NGINX_F_INSTALLED=`/usr/sbin/nginx -v 2>&1 | tr -d "\n" | cut -d" " -f4 | awk '{ print $1}'` 
    33263449    _NGINX_V_INSTALLED=`/usr/sbin/nginx -V 2>&1` 
    install_upgrade_nginx () { 
    33283451      _NGINX_F_INSTALLED=`/usr/sbin/nginx -v 2>&1 | tr -d "\n" | cut -d" " -f3 | awk '{ print $1}'` 
    33293452    fi 
    33303453    _NGINX_F_VERSION="$_CUSTOM_NAME/$_NGINX_VERSION" 
    3331     if [ "$_NGINX_F_INSTALLED" = "$_NGINX_F_VERSION" ] && [ -e "$_NGINX_EXTRA_CTRL" ] && [ "$_STATUS" = "UPGRADE" ] ; then 
     3454    if [ "$_NGINX_F_INSTALLED" = "$_NGINX_F_VERSION" ] && [ "$_STATUS" = "UPGRADE" ] ; then 
    33323455      _NGINX_INSTALL_REQUIRED=NO 
    33333456      msg "INFO: Installed Nginx version $_NGINX_F_INSTALLED, no upgrade required" 
    33343457    elif [ "$_NGINX_F_INSTALLED" = "$_NGINX_F_VERSION" ] && [ "$_STATUS" = "INIT" ] ; then 
    install_upgrade_nginx () { 
    33373460    elif [ "$_NGINX_F_INSTALLED" != "$_NGINX_F_VERSION" ] ; then 
    33383461      _NGINX_INSTALL_REQUIRED=YES 
    33393462      msg "INFO: Installed Nginx version $_NGINX_F_INSTALLED, upgrade required" 
    3340     elif [ "$_NGINX_F_INSTALLED" = "$_NGINX_F_VERSION" ] && [ ! -e "$_NGINX_EXTRA_CTRL" ] && [ "$_STATUS" = "UPGRADE" ] ; then 
    3341       if [ "$_PURGE_MODE" = "ON" ] ; then 
    3342         _NGINX_INSTALL_REQUIRED=YES 
    3343         msg "INFO: Installed Nginx version $_NGINX_F_INSTALLED, forced rebuild to include purge module" 
    3344       fi 
    33453463    fi 
    33463464    if [ "$_NGINX_F_INSTALLED" = "$_NGINX_F_VERSION" ] ; then 
    33473465      if [[ "$_NGINX_V_INSTALLED" =~ "geoip" ]] ; then 
    install_upgrade_nginx () { 
    33683486          msg "INFO: Installed Nginx version $_NGINX_F_INSTALLED, forced rebuild to include LDAP support" 
    33693487        fi 
    33703488      fi 
     3489      if [ "$_PURGE_MODE" = "ON" ] ; then 
     3490        if [[ "$_NGINX_V_INSTALLED" =~ "purge" ]] ; then 
     3491          true 
     3492        else 
     3493          _NGINX_INSTALL_REQUIRED=YES 
     3494          msg "INFO: Installed Nginx version $_NGINX_F_INSTALLED, forced rebuild to include purge module" 
     3495        fi 
     3496      fi 
    33713497    fi 
    33723498    mrun "sleep 1" 
    33733499  else 
    install_upgrade_nginx () { 
    33793505      msg "INFO: Nginx rebuild required to avoid apt-get overwrite" 
    33803506    fi 
    33813507  fi 
     3508  detect_cdorked_malware 
     3509  if [ "$_C_DORKED" = "YES" ] ; then 
     3510    _NGINX_INSTALL_REQUIRED=YES 
     3511    msg "INFO: Nginx rebuild required to remove possible Linux/Cdorked.A malware" 
     3512  fi 
    33823513  if [ "$_NGINX_INSTALL_REQUIRED" = "YES" ] || [ "$_FULL_FORCE_REINSTALL" = "YES" ] || [ "$_NGX_FORCE_REINSTALL" = "YES" ] ; then 
    33833514    if [ "$_STATUS" = "UPGRADE" ] ; then 
    33843515      msg "INFO: Upgrading Nginx, please wait..." 
    install_upgrade_nginx () { 
    34343565    st_runner "sh ./configure --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=www-data --group=www-data --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_ssl_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_scgi_module --without-http_uwsgi_module --with-ipv6 --with-http_geoip_module --with-debug $_NGINX_EXTRA" 2> /dev/null 
    34353566    st_runner "make --quiet" 2> /dev/null 
    34363567    st_runner "make --quiet install" 2> /dev/null 
    3437     if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
     3568    if [ "$_SQUEEZE_TO_WHEEZY" = "YES" ] && [ "$_LOC_REL_VERSION" = "squeeze" ] ; then 
     3569      true 
     3570    elif [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
    34383571      true 
    34393572    else 
    3440       service nginx stop &> /dev/null 
     3573      st_runner "service nginx stop" &> /dev/null 
    34413574      killall -9 nginx &> /dev/null 
    34423575      mrun "sleep 1" 
    3443       service nginx start &> /dev/null 
     3576      st_runner "service nginx start" &> /dev/null 
    34443577    fi 
    34453578    _UP_NGX=NO 
    34463579    _NGINX_INSTALL_REQUIRED=NO 
    get_drush_versions () { 
    37083841 
    37093842###--------------------### 
    37103843if [ `whoami` = "root" ] ; then 
     3844  chmod a+w /dev/null 
    37113845  echo " " 
    37123846  msg "BOA Skynet welcomes you aboard!" 
    37133847  echo " " 
    if [ "$_STATUS" = "UPGRADE" ] ; then 
    38704004 
    38714005  echo "[client]" > /root/.my.cnf 
    38724006  echo "user=root" >> /root/.my.cnf 
    3873   echo "password='your_SQL_ROOT_password'" >> /root/.my.cnf 
     4007  echo "password=your_SQL_ROOT_password" >> /root/.my.cnf 
    38744008  chmod 0600 /root/.my.cnf 
    38754009 
    38764010EOF 
    if [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    40424176    fi 
    40434177  fi 
    40444178else 
    4045   wget -q -U iCab http://files.aegir.cc/versions/nginx-for-drupal-$_AEGIR_VERSION.tar.gz 
    4046   gunzip -q -c nginx-for-drupal-$_AEGIR_VERSION.tar.gz | tar -xf - 
    4047   rm -f nginx-for-drupal-$_AEGIR_VERSION.tar.gz 
     4179  wget -q -U iCab http://files.aegir.cc/versions/nginx-for-drupal-$_INSTALLER_VERSION.tar.gz 
     4180  gunzip -q -c nginx-for-drupal-$_INSTALLER_VERSION.tar.gz | tar -xf - 
     4181  rm -f nginx-for-drupal-$_INSTALLER_VERSION.tar.gz 
    40484182  _BOA_REPO_NAME="nginx-for-drupal" 
    40494183fi 
    40504184# 
    fi 
    40884222###--------------------### 
    40894223msg "INFO: Checking BARRACUDA version..." 
    40904224if [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    4091   _FILE_VERSION=release.txt 
     4225  _FILE_VERSION=barracuda-release.txt 
    40924226else 
    4093   _FILE_VERSION=version.txt 
     4227  _FILE_VERSION=barracuda-version.txt 
    40944228fi 
    40954229if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/$_FILE_VERSION" ] ; then 
    40964230  _VERSIONS_TEST=`cat /opt/tmp/$_BOA_REPO_NAME/aegir/conf/$_FILE_VERSION` 
    if [ "$_THIS_OS" = "Ubuntu" ] ; then 
    41644298    not_supported_os 
    41654299  fi 
    41664300elif [ "$_THIS_OS" = "Debian" ] ; then 
    4167   if [ "$_THIS_RV" = "squeeze" ] ; then 
     4301  if [ "$_THIS_RV" = "wheezy" ] ; then 
     4302    _REL_VERSION="wheezy" 
     4303    _DB_SERVER=MariaDB 
     4304  elif [ "$_THIS_RV" = "squeeze" ] ; then 
    41684305    _REL_VERSION="squeeze" 
    41694306  elif [ "$_THIS_RV" = "lenny" ] ; then 
    41704307    _REL_VERSION="lenny" 
    install_pdnsd_cache () { 
    44484585  mrun "sleep 1" 
    44494586  cp -af /etc/resolv.conf /var/backups/resolv.conf.pre-$_INSTALLER_VERSION-$_NOW 
    44504587  st_runner "aptitude remove pdnsd resolvconf -y" &> /dev/null 
     4588  rm -f /etc/resolv.conf 
    44514589  echo "nameserver 8.8.8.8" > /etc/resolv.conf 
    44524590  echo "nameserver 8.8.4.4" >> /etc/resolv.conf 
    44534591  st_runner "$_INSTALL pdnsd resolvconf" &> /dev/null 
    44544592  sed -i "s/START_DAEMON=no/START_DAEMON=yes/g" /etc/default/pdnsd &> /dev/null 
    44554593  cat /opt/tmp/$_BOA_REPO_NAME/aegir/conf/pdnsd.conf > /etc/pdnsd.conf 
    4456   if [ ! -L "/etc/resolvconf/run" ] && [ -e "/lib/init/rw/resolvconf" ] ; then 
    4457     rm -f /etc/resolvconf/run 
     4594  if [ ! -L "/etc/resolvconf/run" ] || [ ! -e "/lib/init/rw/resolvconf/interface" ] ; then 
     4595    if [ ! -e "/lib/init/rw/resolvconf/interface" ] ; then 
     4596      mkdir -p /lib/init/rw/resolvconf/interface 
     4597    fi 
     4598    rm -f -r /etc/resolvconf/run 
    44584599    ln -s /lib/init/rw/resolvconf /etc/resolvconf/run 
    44594600    rm -f /etc/resolvconf/run/postponed-update 
    44604601    touch /etc/resolvconf/run/enable-updates 
    if [ ! -e "/usr/sbin/pdnsd" ] ; then 
    45264667    install_pdnsd_cache 
    45274668  fi 
    45284669fi 
    4529 if [ ! -L "/etc/resolv.conf" ] && [ -e "/lib/init/rw/resolvconf" ] && [ -e "/usr/sbin/pdnsd" ] ; then 
    4530   _INSTALL_PDNSD=YES 
    4531   msg "INFO: DNS cache pdnsd server re-installation forced" 
    4532   install_pdnsd_cache 
     4670if [ -e "/usr/sbin/pdnsd" ] ; then 
     4671  if [ ! -L "/etc/resolvconf/run" ] || [ ! -e "/lib/init/rw/resolvconf/interface" ] ; then 
     4672    _INSTALL_PDNSD=YES 
     4673    msg "INFO: DNS cache pdnsd server re-installation forced" 
     4674    install_pdnsd_cache 
     4675  fi 
    45334676fi 
    45344677 
    45354678 
    if [ -e "/var/log/apt-fast-install-log.txt" ] ; then 
    45534696    sed -i "s/ftp.*debian.org/archive.debian.org/g" /etc/apt/sources.list &> /dev/null 
    45544697    sed -i "s/volatile.debian.org/archive.debian.org/g" /etc/apt/sources.list &> /dev/null 
    45554698  fi 
    4556   if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_REL_VERSION" = "lenny" ] ; then 
     4699  if [ "$_SQUEEZE_TO_WHEEZY" = "YES" ] && [ "$_REL_VERSION" = "squeeze" ] ; then 
     4700    run_apt_update_again 
     4701    _LOC_REL_VERSION=squeeze 
     4702    _REL_VERSION=wheezy 
     4703    _APT_SOURCES_REWRITE=YES 
     4704  elif [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_REL_VERSION" = "lenny" ] ; then 
    45574705    run_apt_update_again 
    45584706    _LOC_REL_VERSION=lenny 
    45594707    _REL_VERSION=squeeze 
    if [ -e "/var/log/apt-fast-install-log.txt" ] ; then 
    45664714    else 
    45674715      _APT_SOURCES_REWRITE=YES 
    45684716    fi 
    4569     if [ ! -e "/etc/apt/sources.list.d/dotdeb.list" ] ; then 
    4570       _APT_SOURCES_REWRITE=YES 
     4717    if [ "$_DB_SERVER" = "Percona" ] ; then 
     4718      if [ ! -e "/etc/apt/sources.list.d/percona.list" ]; then 
     4719        _APT_SOURCES_REWRITE=YES 
     4720      fi 
     4721    else 
     4722      if [ ! -e "/etc/apt/sources.list.d/mariadb.list" ]; then 
     4723        _APT_SOURCES_REWRITE=YES 
     4724      fi 
    45714725    fi 
    45724726  fi 
    45734727else 
    if [ "$_APT_SOURCES_REWRITE" = "YES" ] ; then 
    46674821    if [ "$_REL_VERSION" = "lenny" ] ; then 
    46684822      echo "deb http://archive.debian.org/debian-volatile $_REL_VERSION/volatile main contrib non-free" >> /etc/apt/sources.list 
    46694823      echo "deb-src http://archive.debian.org/debian-volatile $_REL_VERSION/volatile main contrib non-free" >> /etc/apt/sources.list 
    4670     fi 
    4671     if [ "$_REL_VERSION" = "squeeze" ] ; then 
     4824    else 
    46724825      echo "deb http://$_MIRROR/debian/ $_REL_VERSION-updates main" >> /etc/apt/sources.list 
    46734826      echo "deb-src http://$_MIRROR/debian/ $_REL_VERSION-updates main" >> /etc/apt/sources.list 
    46744827      echo "" >> /etc/apt/sources.list 
    46754828      echo "## DEBIAN SECURITY UPDATES" >> /etc/apt/sources.list 
    46764829      echo "deb http://security.debian.org/ $_REL_VERSION/updates main contrib non-free" >> /etc/apt/sources.list 
    46774830      echo "deb-src http://security.debian.org/ $_REL_VERSION/updates main contrib non-free" >> /etc/apt/sources.list 
    4678       echo "## Dotdeb APT Repository" > /etc/apt/sources.list.d/dotdeb.list 
    4679       echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list.d/dotdeb.list 
    4680       echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list.d/dotdeb.list 
    4681       cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/etc-apt-preferences-debian.txt /etc/apt/preferences 
    4682       _KEYS_SERVER_TEST=FALSE 
    4683       until [[ "$_KEYS_SERVER_TEST" =~ "GnuPG" ]] ; do 
    4684         rm -f dotdeb.gpg* 
    4685         wget -q -U iCab http://www.dotdeb.org/dotdeb.gpg 
    4686         _KEYS_SERVER_TEST=`grep GnuPG dotdeb.gpg 2> /dev/null` 
    4687         sleep 2 
    4688       done 
    4689       cat dotdeb.gpg | apt-key add - &> /dev/null 
    4690       rm -f dotdeb.gpg* 
     4831      if [ "$_REL_VERSION" = "wheezy" ] ; then 
     4832        cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/etc-apt-preferences-wheezy.txt /etc/apt/preferences 
     4833      fi 
     4834      if [ "$_REL_VERSION" = "squeeze" ] ; then 
     4835        cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/etc-apt-preferences-squeeze.txt /etc/apt/preferences 
     4836        if [ "$_FROM_SOURCES" = "NO" ] ; then 
     4837          echo "## Dotdeb APT Repository" > /etc/apt/sources.list.d/dotdeb.list 
     4838          echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list.d/dotdeb.list 
     4839          echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list.d/dotdeb.list 
     4840          _KEYS_SERVER_TEST=FALSE 
     4841          until [[ "$_KEYS_SERVER_TEST" =~ "GnuPG" ]] ; do 
     4842            rm -f dotdeb.gpg* 
     4843            wget -q -U iCab http://www.dotdeb.org/dotdeb.gpg 
     4844            _KEYS_SERVER_TEST=`grep GnuPG dotdeb.gpg 2> /dev/null` 
     4845            sleep 2 
     4846          done 
     4847          cat dotdeb.gpg | apt-key add - &> /dev/null 
     4848          rm -f dotdeb.gpg* 
     4849        fi 
     4850      fi 
    46914851    fi 
    46924852  fi 
    46934853  touch /var/log/apt-fast-install-log.txt 
    if [ ! -e "/etc/apt/preferences" ] ; then 
    47024862fi 
    47034863 
    47044864 
     4865###--------------------### 
     4866if [ "$_SQUEEZE_TO_WHEEZY" = "YES" ] && [ "$_LOC_REL_VERSION" = "squeeze" ] ; then 
     4867  msg "WARN: Squeeze to Wheezy upgrade will start in 60 seconds..." 
     4868  msg "WARN: Now pray it will work... or hit ctrl-c to stop now!" 
     4869  service cron stop &> /dev/null 
     4870  mrun "sleep 60" 
     4871  mv -f /var/xdrago /var/xdrago_wait &> /dev/null 
     4872  msg "WARN: Too late! Squeeze to Wheezy upgrade in progress..." 
     4873  msg "HINT: Run tail -f $_LOG" 
     4874  msg "HINT: in another terminal window to watch details" 
     4875  mrun "sleep 1" 
     4876  _FULL_FORCE_REINSTALL=YES 
     4877  _BUILD_FROM_SRC=YES 
     4878  _FROM_SOURCES=YES 
     4879  _PURGE_MODE=OFF 
     4880  rm -f /var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf 
     4881  if [ -e "/etc/init.d/bind" ] ; then 
     4882    rm -f /etc/init.d/bind 
     4883  fi 
     4884  if [ -e "/etc/default/tomcat" ] && [ -e "/etc/init.d/tomcat" ] ; then 
     4885    service tomcat stop &> /dev/null 
     4886    mv /etc/init.d/tomcat /etc/init.d/offtomcat 
     4887    killall -9 java &> /dev/null 
     4888  fi 
     4889  if [ -d "/var/www/cgp" ] ; then 
     4890    st_runner "apt-get -y remove collectd" 2> /dev/null 
     4891  fi 
     4892  touch /etc/php5/conf.d/{apc.ini,imagick.ini,memcached.ini,redis.ini,suhosin.ini,newrelic.ini} &> /dev/null 
     4893  st_runner "aptitude remove php5 php5-cgi php5-curl php5-fpm php5-gd php5-geoip php5-gmp php5-imagick php5-imap php5-ldap php5-mcrypt php5-memcache php5-mysql php5-sqlite php5-xmlrpc php5-xsl -y" &> /dev/null 
     4894  st_runner "apt-get autoremove -y" &> /dev/null 
     4895  st_runner "aptitude remove phpunit php-pear php-benchmark -y" &> /dev/null 
     4896  st_runner "aptitude remove php5-cli php5-common -y" &> /dev/null 
     4897  st_runner "aptitude remove php5-apc -y" &> /dev/null 
     4898  st_runner "aptitude remove php-apc -y" &> /dev/null 
     4899  rm -f /etc/php5/conf.d/{apc.ini,imagick.ini,memcached.ini,redis.ini,suhosin.ini,newrelic.ini} &> /dev/null 
     4900  if [ "$_PHP_MODERN_ONLY" = "YES" ] ; then 
     4901    if [ -e "/opt/local/bin/php" ] && [ ! -L "/usr/local/bin/php" ] ; then 
     4902      mv -f /usr/local/bin/php /usr/local/bin/php52 &> /dev/null 
     4903      ln -s /opt/local/bin/php /usr/local/bin/php &> /dev/null 
     4904    fi 
     4905  fi 
     4906  st_runner "apt-get -y remove svscan" &> /dev/null 
     4907  st_runner "apt-get -y remove pound" &> /dev/null 
     4908  st_runner "apt-get update -y" &> /dev/null 
     4909  st_runner "apt-get -f -y -q --config-file /opt/tmp/apt.conf.noninteractive install apt dpkg aptitude" 2> /dev/null 
     4910  st_runner "apt-get -f -y -q --config-file /opt/tmp/apt.conf.noninteractive dist-upgrade" 2> /dev/null 
     4911  if [ "$_FROM_SOURCES" = "YES" ] || [ "$_NGINX_FROM_SOURCES" = "YES" ] ; then 
     4912    install_upgrade_nginx 
     4913  fi 
     4914  if [ -e "/etc/init.d/bind9" ] && [ ! -e "/etc/init.d/bind" ] ; then 
     4915    ln -s /etc/init.d/bind9 /etc/init.d/bind 
     4916  fi 
     4917  if [ -d "/var/www/cgp" ] ; then 
     4918    st_runner "apt-get -y install collectd" 2> /dev/null 
     4919  fi 
     4920  _L_VM_TEST=`uname -a 2>&1` 
     4921  if [[ "$_L_VM_TEST" =~ beng ]] ; then 
     4922    _REMOVE_LINKS="halt hwclock.sh hwclockfirst.sh ifupdown ifupdown-clean klogd mountall-bootclean.sh mountall.sh mountdevsubfs.sh mountkernfs.sh mountnfs-bootclean.sh mountnfs.sh mountoverflowtmp mountvirtfs mtab.sh networking reboot setserial umountfs umountnfs.sh umountroot urandom" 
     4923    for link in $_REMOVE_LINKS 
     4924    do 
     4925      update-rc.d -f $link remove &> /dev/null 
     4926    done 
     4927  fi 
     4928  echo rotate > /var/log/syslog &> /dev/null 
     4929  mv -f /var/xdrago_wait /var/xdrago &> /dev/null 
     4930  msg "INFO: No errors? Then Squeeze to Wheezy upgrade was successful - congrats!" 
     4931  msg "HINT: Please remember to reboot when Barracuda will complete all upgrades" 
     4932fi 
     4933 
    47054934 
    47064935###--------------------### 
    47074936if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
    if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
    47264955  if [ -d "/var/www/cgp" ] ; then 
    47274956    st_runner "apt-get -y remove collectd" 2> /dev/null 
    47284957  fi 
    4729   if [ -e "/opt/local/bin/php" ] && [ ! -L "/usr/local/bin/php" ] ; then 
    4730     mv -f /usr/local/bin/php /usr/local/bin/php52 &> /dev/null 
    4731     ln -s /opt/local/bin/php /usr/local/bin/php &> /dev/null 
     4958  if [ "$_PHP_MODERN_ONLY" = "YES" ] ; then 
     4959    if [ -e "/opt/local/bin/php" ] && [ ! -L "/usr/local/bin/php" ] ; then 
     4960      mv -f /usr/local/bin/php /usr/local/bin/php52 &> /dev/null 
     4961      ln -s /opt/local/bin/php /usr/local/bin/php &> /dev/null 
     4962    fi 
    47324963  fi 
    47334964  st_runner "apt-get -y remove libc-client2007b-dev" 2> /dev/null 
    47344965  st_runner "apt-get -y remove svscan" 2> /dev/null 
    else 
    48095040    touch /etc/php5/conf.d/{apc.ini,imagick.ini,memcached.ini,redis.ini,suhosin.ini,newrelic.ini} &> /dev/null 
    48105041    st_runner "aptitude remove php5 php5-cgi php5-curl php5-fpm php5-gd php5-geoip php5-gmp php5-imagick php5-imap php5-ldap php5-mcrypt php5-memcache php5-mysql php5-sqlite php5-xmlrpc php5-xsl -y" &> /dev/null 
    48115042    st_runner "apt-get autoremove -y" &> /dev/null 
     5043    st_runner "aptitude remove phpunit php-pear php-benchmark -y" &> /dev/null 
     5044    st_runner "aptitude remove php5-cli php5-common -y" &> /dev/null 
     5045    st_runner "aptitude remove php5-apc -y" &> /dev/null 
     5046    st_runner "aptitude remove php-apc -y" &> /dev/null 
    48125047    rm -f /etc/php5/conf.d/{apc.ini,imagick.ini,memcached.ini,redis.ini,suhosin.ini,newrelic.ini} &> /dev/null 
     5048    if [ "$_REL_VERSION" = "squeeze" ] ; then 
     5049      rm -f /etc/apt/sources.list.d/dotdeb.list 
     5050    fi 
    48135051  fi 
    48145052  rm -f /var/lib/mysql/debian-*.flag &> /dev/null 
    48155053  _KEYS_SERVER_TEST=FALSE 
    else 
    48215059    _KEYS_SERVER_TEST=`apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 1BB943DB 2>&1` 
    48225060    sleep 2 
    48235061  done 
     5062  _UP_FPM=NO 
     5063  _UP_JDK=NO 
    48245064  _UP_LNX=NO 
    4825   _UP_PHP=NO 
    48265065  _UP_NGX=NO 
    4827   _UP_JDK=NO 
    4828   _UP_FPM=NO 
     5066  _UP_NRC=NO 
     5067  _UP_PHP=NO 
    48295068  check_apt_updates 
    48305069fi 
    48315070 
    fi 
    48485087msg "NOTE! This step may take a few minutes, please wait..." 
    48495088if [ "$_STATUS" = "INIT" ] ; then 
    48505089  if [ "$_FROM_SOURCES" = "NO" ] ; then 
    4851     if [ "$_REL_VERSION" = "precise" ] ; then 
     5090    if [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    48525091      _APT_XTRA="openjdk-7-jdk openjdk-6-jdk nginx-extras" 
    48535092    else 
    48545093      _APT_XTRA="openjdk-6-jdk nginx-extras" 
    48555094    fi 
    48565095    _APT_ELSE="netcat nginx" 
    48575096  else 
    4858     if [ "$_REL_VERSION" = "precise" ] ; then 
     5097    if [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    48595098      _APT_XTRA="openjdk-7-jdk openjdk-6-jdk nginx" 
    48605099    else 
    48615100      _APT_XTRA="openjdk-6-jdk nginx" 
    if [ "$_STATUS" = "INIT" ] ; then 
    48635102    _APT_ELSE="netcat nginx" 
    48645103  fi 
    48655104else 
    4866   if [ "$_REL_VERSION" = "precise" ] ; then 
     5105  if [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    48675106    _APT_XTRA="openjdk-7-jdk openjdk-6-jdk" 
    48685107  else 
    48695108    _APT_XTRA="openjdk-6-jdk" 
    if [ ! -z "$_EXTRA_PACKAGES" ] ; then 
    48915130else 
    48925131  _EXTRA_PACKAGES="screen" 
    48935132fi 
    4894 if [ "$_REL_VERSION" = "lenny" ] ; then 
     5133if [ "$_REL_VERSION" = "wheezy" ] || [ "$_REL_VERSION" = "squeeze" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "lucid" ] || [ "$_REL_VERSION" = "maverick" ] || [ "$_REL_VERSION" = "natty" ] || [ "$_REL_VERSION" = "oneiric" ] ; then 
     5134  _DEBDEPS="apticron aptitude auditd autoconf2.13 automake automake1.4 autotools-dev bc bison build-essential cron curl cvs defoma devscripts dnsutils dstat flex fontconfig-config ghostscript gnupg imagemagick htop ifstat iptables libapr1 lemon libaprutil1 libc-client-dev libc-client2007e libc-client2007e-dev libcurl4-openssl-dev libfilesys-diskspace-perl libfontconfig1 libfreetype6 libfreetype6-dev libfribidi0 libgd2-xpm libhtml-template-perl libjpeg-dev libjpeg62 $_EXTRA_LIB_APT libnet-daemon-perl libpcre3 libpcre3-dev libplrpc-perl libpng12-0 libpng12-dev libpq5 libsasl2-modules libssl-dev libt1-5 libt1-dev libtool libwww-perl libxml2-dev libxpm4 libxslt-dev libxslt1-dbg libxslt1-dev libxslt1.1 lftp m4 makepasswd mc mcrypt nano netcat ncurses-dev $_APT_XTRA postfix postfix-pcre pwgen python-dev cython re2c rsync shtool ssh ssl-cert subversion sudo sysstat sysvinit-utils t1lib-bin telnet time ttf-dejavu ttf-dejavu-core ttf-dejavu-extra unzip vim whois xml-core xml2 zip zlib1g-dev zlibc xpdf catdoc unrtf pdftk libterm-readkey-perl rrdtool libpam-umask ntpdate p7zip-full sipcalc rsyslog libgmp3-dev symlinks libgeoip1 libgeoip-dev geoip-database libmagickwand-dev gettext ncurses-term udev libpam-unix2 libxcrypt1 s3cmd python-software-properties $_EXTRA_PACKAGES" 
     5135elif [ "$_REL_VERSION" = "lenny" ] ; then 
    48955136  _DEBDEPS="apticron aptitude auditd autoconf2.13 automake automake1.4 autotools-dev bc bison build-essential cron curl cvs defoma devscripts dnsutils dstat flex fontconfig-config ghostscript gnupg imagemagick htop ifstat iptables lemon libapr1 libaprutil1 libc-client-dev libc-client2007b libc-client2007b-dev libcurl4-openssl-dev libfilesys-diskspace-perl libfontconfig1 libfreetype6 libfreetype6-dev libfribidi0 libgd2-xpm libhtml-template-perl libjpeg-dev libjpeg62 $_EXTRA_LIB_APT libnet-daemon-perl libpcre3 libpcre3-dev libplrpc-perl libpng12-dev libpng12-0 libpq5 libsasl2-modules libssl-dev libt1-5 libt1-dev libtool libwww-perl libxml2-dev libxpm4 libxslt-dev libxslt1-dbg libxslt1-dev libxslt1.1 lftp m4 makepasswd mc mcrypt nano $_APT_ELSE ncurses-dev openjdk-6-jdk postfix postfix-pcre pwgen python-dev cython re2c rsync shtool ssh ssl-cert subversion sudo sysstat sysvconfig t1lib-bin telnet time ttf-dejavu ttf-dejavu-core ttf-dejavu-extra vim whois xml-core xml2 zlib1g-dev zlibc unzip zip xpdf catdoc unrtf pdftk libterm-readkey-perl rrdtool libpam-umask ntpdate p7zip-full sipcalc rsyslog libgmp3-dev symlinks libgeoip1 libgeoip-dev libmagick9-dev gettext ncurses-term udev $_EXTRA_PACKAGES" 
    4896 elif [ "$_REL_VERSION" = "squeeze" ] || [ "$_REL_VERSION" = "lucid" ] || [ "$_REL_VERSION" = "maverick" ] || [ "$_REL_VERSION" = "natty" ] || [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
    4897   _DEBDEPS="apticron aptitude auditd autoconf2.13 automake automake1.4 autotools-dev bc bison build-essential cron curl cvs defoma devscripts dnsutils dstat flex fontconfig-config ghostscript gnupg imagemagick htop ifstat iptables libapr1 lemon libaprutil1 libc-client-dev libc-client2007e libc-client2007e-dev libcurl4-openssl-dev libfilesys-diskspace-perl libfontconfig1 libfreetype6 libfreetype6-dev libfribidi0 libgd2-xpm libhtml-template-perl libjpeg-dev libjpeg62 $_EXTRA_LIB_APT libnet-daemon-perl libpcre3 libpcre3-dev libplrpc-perl libpng12-0 libpng12-dev libpq5 libsasl2-modules libssl-dev libt1-5 libt1-dev libtool libwww-perl libxml2-dev libxpm4 libxslt-dev libxslt1-dbg libxslt1-dev libxslt1.1 lftp m4 makepasswd mc mcrypt nano netcat ncurses-dev $_APT_XTRA postfix postfix-pcre pwgen python-dev cython re2c rsync shtool ssh ssl-cert subversion sudo sysstat sysvinit-utils t1lib-bin telnet time ttf-dejavu ttf-dejavu-core ttf-dejavu-extra unzip vim whois xml-core xml2 zip zlib1g-dev zlibc xpdf catdoc unrtf pdftk libterm-readkey-perl rrdtool libpam-umask ntpdate p7zip-full sipcalc rsyslog libgmp3-dev symlinks libgeoip1 libgeoip-dev geoip-database libmagickwand-dev gettext ncurses-term udev $_EXTRA_PACKAGES" 
    48985137else 
    48995138  _DEBDEPS="apticron aptitude auditd autoconf2.13 automake automake1.4 autotools-dev bc bison build-essential cron curl cvs defoma devscripts dnsutils dstat flex fontconfig-config ghostscript gnupg imagemagick htop ifstat iptables lemon libapr1 libaprutil1 libc-client-dev libc-client2007b libc-client2007b-dev libcurl4-openssl-dev libfilesys-diskspace-perl libfontconfig1 libfreetype6 libfreetype6-dev libfribidi0 libgd2-xpm libhtml-template-perl libjpeg-dev libjpeg62 $_EXTRA_LIB_APT libnet-daemon-perl libpcre3 libpcre3-dev libplrpc-perl libpng12-dev libpng12-0 libpq5 libsasl2-modules libssl-dev libt1-5 libt1-dev libtool libwww-perl libxml2-dev libxpm4 libxslt-dev libxslt1-dbg libxslt1-dev libxslt1.1 lftp m4 makepasswd mc mcrypt nano $_APT_ELSE ncurses-dev openjdk-6-jdk postfix postfix-pcre pwgen python-dev cython re2c rsync shtool ssh ssl-cert subversion sudo sysstat sysvinit-utils t1lib-bin telnet time ttf-dejavu ttf-dejavu-core ttf-dejavu-extra vim whois xml-core xml2 zlib1g-dev zlibc unzip zip xpdf catdoc unrtf pdftk libterm-readkey-perl rrdtool libpam-umask ntpdate p7zip-full sipcalc rsyslog libgmp3-dev symlinks libgeoip1 libgeoip-dev libmagick9-dev gettext ncurses-term udev $_EXTRA_PACKAGES" 
    49005139fi 
    install_mariadb_sql () { 
    49755214  SQLADD="libmariadbclient-dev libmariadbclient16 libmariadbd-dev libdbd-mysql-perl python-mysqldb libdbi-perl" 
    49765215} 
    49775216install_with_aptitude_sql () { 
    4978   if [ "$_REL_VERSION" = "squeeze" ] || [ "$_REL_VERSION" = "lucid" ] || [ "$_REL_VERSION" = "maverick" ] || [ "$_REL_VERSION" = "natty" ] || [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     5217  if [ "$_REL_VERSION" = "squeeze" ] || [ "$_REL_VERSION" = "lucid" ] || [ "$_REL_VERSION" = "precise" ] ; then 
    49795218    _PERCONA_READY=YES 
     5219    msg "INFO: Installing $_DB_SERVER, please wait..." 
    49805220  else 
    49815221    _PERCONA_READY=NO 
     5222    msg "INFO: Installing MariaDB, please wait..." 
    49825223  fi 
    4983   msg "INFO: Installing $_DB_SERVER, please wait..." 
    49845224  if [ "$_PERCONA_READY" = "YES" ] && [ "$_DB_SERVER" = "Percona" ] ; then 
    49855225    install_percona_sql 
    49865226    st_runner "$_INSTAPP mytop" 2> /dev/null 
    49875227  else 
    49885228    install_mariadb_sql 
     5229    st_runner "$_INSTAPP mytop" 2> /dev/null 
    49895230    echo "fixed-mytop-mariadb" > /var/log/fixed-mytop-mariadb.log 
    49905231  fi 
    49915232  st_runner "$_INSTAPP $SQLDEB" 2> /dev/null 
    if [ "$_STATUS" = "INIT" ] ; then 
    50055246fi 
    50065247install_with_aptitude_deps 
    50075248fix_locales 
     5249if [ "$_LOCALE_TEST" = "BROKEN" ] ; then 
     5250  _STRONG_PASSWORDS=NO 
     5251fi 
    50085252if [ ! -e "/etc/aliases" ] ; then 
    50095253  echo "postmaster:    root" > /etc/aliases 
    50105254  newaliases &> /dev/null 
    if [ "$_STATUS" = "INIT" ] ; then 
    50275271  fi 
    50285272  install_with_aptitude_sql 
    50295273else 
     5274  if [ "$_UP_NRC" = "YES" ] ; then 
     5275    update_newrelic 
     5276  fi 
    50305277  _SQL_UPGRADE=NO 
    50315278  if [[ "$_DB_SERVER_TEST" =~ "MariaDB" ]] ; then 
    50325279    _SQL_TEST_UPGRADE=NO 
    else 
    50465293  elif [ "$_REL_VERSION" = "squeeze" ] && [[ "$_DB_SERVER_TEST" =~ "MariaDB" ]] && [[ "$_DB_SERVER_TEST" =~ " 5.3." ]] ; then 
    50475294    _SQL_UPGRADE=YES 
    50485295  fi 
    5049   if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
     5296  if [ "$_SQUEEZE_TO_WHEEZY" = "YES" ] && [ "$_LOC_REL_VERSION" = "squeeze" ] ; then 
     5297    _SQL_UPGRADE=NO 
     5298  elif [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
    50505299    _SQL_UPGRADE=NO 
    50515300  fi 
    50525301  if [ "$_SQL_UPGRADE" = "YES" ] ; then 
    install_with_aptitude_deps 
    51095358st_runner "service php5-fpm stop" &> /dev/null 
    51105359st_runner "update-rc.d -f php5-fpm remove" &> /dev/null 
    51115360install_latest_git 
    5112 if [ "$_LENNY_TO_SQUEEZE" = "NO" ] ; then 
     5361if [ "$_SQUEEZE_TO_WHEEZY" = "NO" ] && [ "$_LENNY_TO_SQUEEZE" = "NO" ] ; then 
    51135362  if [ "$_FROM_SOURCES" = "YES" ] && [ "$_USE_MEMCACHED" = "YES" ] ; then 
    51145363    install_upgrade_libevent 
    51155364  fi 
    fi 
    51175366if [ "$_FROM_SOURCES" = "YES" ] || [ "$_NGINX_FROM_SOURCES" = "YES" ] ; then 
    51185367  install_upgrade_nginx 
    51195368fi 
    5120 set_xterm 
    51215369kill_nash 
    51225370fix_ftps_modern 
    51235371enable_purge_cruft_machine 
    install_wkhtmltoimage 
    51265374 
    51275375 
    51285376###--------------------### 
    5129 if [ "$_REL_VERSION" = "natty" ] || [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     5377if [ "$_REL_VERSION" = "natty" ] || [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    51305378  if [ ! -L "/usr/lib/libpng.so" ] ; then 
    5131     msg "INFO: Fix #1 for libs in Ubuntu $_REL_VERSION" 
     5379    msg "INFO: Fix #1 for libs in $_THIS_OS $_REL_VERSION" 
    51325380    _X86_64_TEST=`uname -m` 
    51335381    if [ "$_X86_64_TEST" = "x86_64" ] ; then 
    51345382      ln -s /usr/lib/x86_64-linux-gnu/libpng.so  /usr/lib/libpng.so 
    fi 
    51445392 
    51455393 
    51465394###--------------------### 
    5147 if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     5395if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    51485396  if [ ! -L "/usr/lib/libssl.so.1.0.0" ] ; then 
    5149     msg "INFO: Fix #2 for libs in Ubuntu $_REL_VERSION" 
     5397    msg "INFO: Fix #2 for libs in $_THIS_OS $_REL_VERSION" 
    51505398    _X86_64_TEST=`uname -m` 
    51515399    if [ "$_X86_64_TEST" = "x86_64" ] ; then 
    51525400      if [ -e "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0" ] ; then 
    if [ -d "/var/xdrago" ] && [ -e "/var/aegir/.drush/hostmaster.alias.drushrc.php" 
    53055553    _THISHTIP="$_LOC_IP" 
    53065554  fi 
    53075555  if [[ "$_THISHOST" =~ ".host8." ]] ; then 
    5308     _NGINX_DOS_LIMIT=259 
     5556    _NGINX_DOS_LIMIT=199 
    53095557  fi 
    53105558  sed -i "s/88.88.88.88/$_THISHTIP/g"    /var/xdrago/monitor/check/scan_nginx &> /dev/null 
    53115559  sed -i "s/= 300/= $_NGINX_DOS_LIMIT/g" /var/xdrago/monitor/check/scan_nginx &> /dev/null 
    if [ -d "/var/xdrago" ] && [ -e "/var/aegir/.drush/hostmaster.alias.drushrc.php" 
    53295577    if [ -e "/usr/share/man/man3/buagent.3.gz" ] ; then 
    53305578      chmod 644 /usr/share/man/man3/buagent.3.gz 
    53315579    fi 
    5332     sed -i "s/l10n_update/l10n_update update purge expire seckit background_process ultimate_cron httprl/g" /var/xdrago/usage.sh &> /dev/null 
     5580    sed -i "s/devel performance/devel performance update purge expire seckit background_process ultimate_cron/g" /var/xdrago/usage.sh &> /dev/null 
     5581    sed -i "s/performance devel/performance devel purge expire seckit background_process ultimate_cron/g" /var/xdrago/usage.sh &> /dev/null 
    53335582  else 
    5334     sed -i "s/l10n_update/l10n_update purge expire/g" /var/xdrago/usage.sh &> /dev/null 
     5583    sed -i "s/devel performance/devel performance purge expire/g" /var/xdrago/usage.sh &> /dev/null 
    53355584    sed -i "s/log\/lshell/log\/lsh/g" /etc/logrotate.d/lshell &> /dev/null 
    53365585  fi 
    53375586fi 
    if [ "$_STATUS" = "INIT" ] ; then 
    53495598    _THISHTIP="$_LOC_IP" 
    53505599  fi 
    53515600  if [[ "$_THISHOST" =~ ".host8." ]] ; then 
    5352     _NGINX_DOS_LIMIT=259 
     5601    _NGINX_DOS_LIMIT=199 
    53535602  fi 
    53545603  sed -i "s/88.88.88.88/$_THISHTIP/g"    /var/xdrago/monitor/check/scan_nginx &> /dev/null 
    53555604  sed -i "s/= 300/= $_NGINX_DOS_LIMIT/g" /var/xdrago/monitor/check/scan_nginx &> /dev/null 
    if [ "$_STATUS" = "INIT" ] ; then 
    53665615    if [ -e "/usr/share/man/man3/buagent.3.gz" ] ; then 
    53675616      chmod 644 /usr/share/man/man3/buagent.3.gz 
    53685617    fi 
    5369     sed -i "s/l10n_update/l10n_update update purge expire seckit background_process ultimate_cron httprl/g" /var/xdrago/usage.sh &> /dev/null 
     5618    sed -i "s/devel performance/devel performance update purge expire seckit background_process ultimate_cron/g" /var/xdrago/usage.sh &> /dev/null 
     5619    sed -i "s/performance devel/performance devel purge expire seckit background_process ultimate_cron/g" /var/xdrago/usage.sh &> /dev/null 
    53705620  else 
    5371     sed -i "s/l10n_update/l10n_update purge expire/g" /var/xdrago/usage.sh &> /dev/null 
     5621    sed -i "s/devel performance/devel performance purge expire/g" /var/xdrago/usage.sh &> /dev/null 
    53725622  fi 
    53735623fi 
    53745624if [ -d "/var/xdrago-pre-$_INSTALLER_VERSION-$_NOW" ] ; then 
    fi 
    54045654 
    54055655 
    54065656###--------------------### 
    5407 if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
    5408   service nginx stop &> /dev/null 
     5657if [ "$_SQUEEZE_TO_WHEEZY" = "YES" ] && [ "$_LOC_REL_VERSION" = "squeeze" ] ; then 
     5658  st_runner "service nginx stop" &> /dev/null 
     5659  killall -9 nginx &> /dev/null 
     5660 
     5661elif [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
     5662  st_runner "service nginx stop" &> /dev/null 
    54095663  killall -9 nginx &> /dev/null 
    54105664fi 
    54115665if [ "$_STATUS" = "UPGRADE" ] ; then 
    if [ "$_STATUS" = "UPGRADE" ] ; then 
    54135667  mrun "sleep 1" 
    54145668  ###--------------------### 
    54155669  if [ -L "/usr/local/bin/php" ] ; then 
    5416     if [ -e "/usr/local/bin/php52" ] ; then 
     5670    if [ -e "/usr/local/bin/php52" ] || [ "$_PHP_CLI_VERSION" = "5.2" ] ; then 
    54175671      rm -f /usr/local/bin/php 
    5418       mv -f /usr/local/bin/php52 /usr/local/bin/php 
     5672      if [ -e "/usr/local/bin/php52" ] ; then 
     5673        mv -f /usr/local/bin/php52 /usr/local/bin/php 
     5674      fi 
    54195675    fi 
    54205676  fi 
    54215677  ###--------------------### 
    elif [ -x "/opt/local/bin/php" ] ; then 
    54365692  _PHP_NEW_BIN="/opt/local/bin/php" 
    54375693fi 
    54385694if [ -x "$_PHP_NEW_BIN" ] ; then 
    5439   _PHP_INSTALLED=`$_PHP_NEW_BIN -v | grep 'PHP 5' | cut -d: -f1 | awk '{ print $2}'` 
     5695  if [ "$_FULL_FORCE_REINSTALL" = "YES" ] ; then 
     5696    _PHP_INSTALLED=5.x 
     5697  else 
     5698    _PHP_INSTALLED=`$_PHP_NEW_BIN -v | grep 'PHP 5' | cut -d: -f1 | awk '{ print $2}'` 
     5699  fi 
    54405700  if [[ "$_PHP_INSTALLED" =~ "$_PHP_VERSION_NEW" ]] ; then 
    54415701    if [ "$_FROM_SOURCES" = "YES" ] ; then 
    54425702      if [[ "$_PHP_INSTALLED" =~ "~" ]] || [[ "$_PHP_INSTALLED" =~ "dotdeb" ]] || [[ "$_PHP_INSTALLED" =~ "ubuntu" ]] ; then 
    else 
    54665726fi 
    54675727if [ "$_PHP_MODERN_ONLY" = "NO" ] ; then 
    54685728  if [ -x "/usr/local/bin/php" ] ; then 
    5469     _PHP_INSTALLED=`/usr/local/bin/php -v | grep 'PHP 5' | cut -d: -f1 | awk '{ print $2}'` 
     5729    if [ "$_FULL_FORCE_REINSTALL" = "YES" ] ; then 
     5730      _PHP_INSTALLED=5.x 
     5731    else 
     5732      _PHP_INSTALLED=`/usr/local/bin/php -v | grep 'PHP 5' | cut -d: -f1 | awk '{ print $2}'` 
     5733    fi 
    54705734    if [[ "$_PHP_INSTALLED" =~ "$_PHP_VERSION" ]] ; then 
    54715735      _PHP_INSTALL_REQUIRED=NO 
    54725736      msg "INFO: Installed PHP version $_PHP_INSTALLED, no upgrade required" 
    if [ "$_UP_PHP" = "YES" ] && [ "$_FROM_SOURCES" = "YES" ] ; then 
    55425806  msg "INFO: PHP rebuild required to include upgraded libs" 
    55435807  fix_php_ext 
    55445808fi 
    5545 if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
     5809if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] || [ "$_REL_VERSION" = "wheezy" ] ; then 
    55465810  _PHP_EXTRA="" 
    55475811else 
    55485812  _PHP_EXTRA="--with-ldap --with-gmp" 
    if [ "$_REL_VERSION" = "precise" ] && [ ! -e "/var/log/precise-apc-fixed.log" ] 
    55795843  st_runner "$_INSTAPP php-apc" 2> /dev/null 
    55805844  touch /var/log/precise-apc-fixed.log 
    55815845fi 
     5846if [ "$_PHP_INSTALL_REQUIRED" = "YES" ] || [ "$_PHP_INSTALL_REQUIRED_NEW" = "YES" ] || [ "$_FULL_FORCE_REINSTALL" = "YES" ] ; then 
     5847  update_newrelic 
     5848fi 
    55825849st_runner "aptitude remove php5-sasl php5-suhosin -y" &> /dev/null 
    55835850st_runner "apt-get purge php5-sasl php5-suhosin -y" &> /dev/null 
    55845851if [ ! -L "/usr/bin/php-cli" ] ; then 
    fi 
    55885855 
    55895856 
    55905857###--------------------### 
    5591 update_newrelic 
    55925858install_newrelic 
    55935859 
    55945860 
    fi 
    58306096###--------------------### 
    58316097if [[ "$_XTRAS_LIST" =~ "SR4" ]] ; then 
    58326098  if [ ! -d "/opt/solr4" ] ; then 
    5833     if [ "$_REL_VERSION" = "precise" ] && [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
     6099    if [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
    58346100      _REAL_JETTY=9 
    58356101    else 
    58366102      _REAL_JETTY=8 
    if [[ "$_XTRAS_LIST" =~ "SR4" ]] ; then 
    58456111      rm -f -r /opt/solr4 
    58466112      rm -f -r /opt/jetty9 
    58476113      rm -f /etc/jetty.conf 
    5848       if [ "$_REL_VERSION" = "precise" ] && [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
     6114      if [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
    58496115        get_dev_arch "jetty-distribution-$_JETTY_9_VERSION.tar.gz" &> /dev/null 
    58506116        mv /var/opt/jetty-distribution-$_JETTY_9_VERSION /opt/jetty9 
    58516117        echo $_JETTY_9_VERSION > /opt/jetty9/jetty-$_JETTY_9_VERSION-version.txt 
    if [[ "$_XTRAS_LIST" =~ "SR4" ]] ; then 
    58906156      chown -R jetty9:jetty9 /opt/solr4 
    58916157      chown -R jetty9:jetty9 /opt/jetty9 
    58926158      chown -R jetty9:jetty9 /var/log/jetty9 
    5893       if [ "$_REL_VERSION" = "precise" ] && [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
     6159      if [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
    58946160        echo "JAVA=/usr/bin/java7 # Path to Java 1.7" > /etc/default/jetty9 
    58956161        echo "JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre # Path to Java 1.7" >> /etc/default/jetty9 
    58966162      else 
    if [[ "$_XTRAS_LIST" =~ "SR4" ]] ; then 
    59066172      echo "JETTY_RUN=/var/run # Run directory" >> /etc/default/jetty9 
    59076173      echo "JETTY_PID=\$JETTY_RUN/jetty9.pid # Pid file" >> /etc/default/jetty9 
    59086174      echo "JAVA_OPTIONS=\"-Xms8m -Xmx128m -Djava.awt.headless=true -Dsolr.solr.home=/opt/solr4 \$JAVA_OPTIONS\" # Options" >> /etc/default/jetty9 
    5909       if [ "$_REL_VERSION" = "precise" ] && [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
     6175      if [[ "$_APT_XTRA" =~ "openjdk-7-jdk" ]] ; then 
    59106176        true 
    59116177      else 
    59126178        sed -i "s/8/9/g" /opt/jetty9/bin/jetty.sh &> /dev/null 
    if [ "$_STATUS" = "INIT" ] ; then 
    62656531 
    62666532 
    62676533###--------------------### 
    6268   mv -f /var/aegir/config/includes/global.inc /var/aegir/config/includes/global.inc-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
     6534  if [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/var/aegir/config/includes/global.inc" ] ; then 
     6535    mv -f /var/aegir/config/includes/global.inc /var/aegir/config/includes/global.inc-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
     6536  fi 
     6537  mkdir -p /data/conf 
    62696538  if [ -e "/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf" ] ; then 
    6270     cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /var/aegir/config/includes/global.inc 
     6539    cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /data/conf/global.inc 
    62716540  else 
    6272     cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.aegir.txt /var/aegir/config/includes/global.inc 
     6541    cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.aegir.txt /data/conf/global.inc 
     6542  fi 
     6543  sed -i "s/3600/$_SPEED_VALID_MAX/g" /data/conf/global.inc &> /dev/null 
     6544  if [ -e "/var/aegir/config/includes" ] && [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/data/conf/global.inc" ] ; then 
     6545    rm -f /var/aegir/config/includes/global.inc 
     6546    ln -s /data/conf/global.inc /var/aegir/config/includes/global.inc 
    62736547  fi 
    6274   sed -i "s/3600/$_SPEED_VALID_MAX/g" /var/aegir/config/includes/global.inc &> /dev/null 
    62756548  update_redis_password 
    62766549  force_advanced_nginx_config 
    62776550  if [ "$_DRUSH_VERSION" = "7.x-4.5" ] || [ "$_DRUSH_VERSION" = "4.6-dev" ] ; then 
    if [ "$_STATUS" = "INIT" ] ; then 
    62956568    mv -f /etc/nginx/nginx.conf /etc/nginx/nginx.conf-old &> /dev/null 
    62966569    cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/nginx.conf /etc/nginx/nginx.conf 
    62976570  fi 
    6298   service nginx reload &> /dev/null 
     6571  st_runner "service nginx reload" &> /dev/null 
    62996572  mrun "sleep 1" 
    63006573  msg "INFO: Aegir Master Instance installation completed" 
    63016574  mrun "sleep 1" 
    63026575else 
    63036576  echo " " 
    6304   if [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
     6577  if [ "$_SQUEEZE_TO_WHEEZY" = "YES" ] && [ "$_LOC_REL_VERSION" = "squeeze" ] ; then 
    63056578    msg "INFO: Aegir Master Instance upgrade skipped!" 
    63066579    echo " " 
    6307     msg "NOTE! You *must* reboot the server and then run Barracuda *again*" 
     6580    msg "NOTE! You *must* reboot the server and then run boa up-stable *again*" 
     6581    msg "NOTE! to complete all system upgrades and upgrade also" 
     6582    msg "NOTE! Aegir Master Instance securely" 
     6583    echo " " 
     6584  elif [ "$_LENNY_TO_SQUEEZE" = "YES" ] && [ "$_LOC_REL_VERSION" = "lenny" ] ; then 
     6585    msg "INFO: Aegir Master Instance upgrade skipped!" 
     6586    echo " " 
     6587    msg "NOTE! You *must* reboot the server and then run boa up-stable *again*" 
    63086588    msg "NOTE! to complete all system upgrades and upgrade also" 
    63096589    msg "NOTE! Aegir Master Instance securely" 
    63106590    echo " " 
    EOF 
    63876667      sed -i "s/127.0.0.1:80/$_THISHTIP:80/g" /var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf &> /dev/null 
    63886668    fi 
    63896669    sed -i "s/127.0.0.1:443/$_XTRAS_THISHTIP:443/g" /var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf &> /dev/null 
     6670    mkdir -p /data/conf 
    63906671    if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt" ] ; then 
    6391       mv -f /var/aegir/config/includes/global.inc /var/aegir/config/includes/global.inc-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
    6392       cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /var/aegir/config/includes/global.inc 
     6672      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /data/conf/global.inc 
    63936673    fi 
    6394     sed -i "s/3600/$_SPEED_VALID_MAX/g" /var/aegir/config/includes/global.inc &> /dev/null 
     6674    if [ -e "/var/aegir/config/includes" ] && [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/data/conf/global.inc" ] ; then 
     6675      rm -f /var/aegir/config/includes/global.inc 
     6676      ln -s /data/conf/global.inc /var/aegir/config/includes/global.inc 
     6677    fi 
     6678    sed -i "s/3600/$_SPEED_VALID_MAX/g" /data/conf/global.inc &> /dev/null 
    63956679    update_redis_password 
    63966680    killall -9 nginx &> /dev/null 
    63976681    mrun "sleep 1" 
    6398     service nginx start &> /dev/null 
     6682    st_runner "service nginx start" &> /dev/null 
    63996683  fi 
    64006684fi 
    64016685 
    64026686 
    64036687###--------------------### 
    64046688if [ -e "/var/aegir/config/server_master/nginx/pre.d" ] ; then 
    6405   if [ ! -e "/var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf" ] && [ "$_PURGE_MODE" = "ON" ] ; then 
    6406     cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/nginx_speed_purge.conf /var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf 
    6407     touch /var/log/nginx-speed-purge-$_INSTALLER_VERSION 
     6689  if [ "$_PURGE_MODE" = "ON" ] ; then 
     6690    if [ ! -e "/var/log/nginx-speed-purge-$_INSTALLER_VERSION" ] || [ ! -e "/var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf" ] ; then 
     6691      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/nginx_speed_purge.conf /var/aegir/config/server_master/nginx/pre.d/nginx_speed_purge.conf 
     6692      touch /var/log/nginx-speed-purge-$_INSTALLER_VERSION 
     6693    fi 
    64086694  fi 
    64096695fi 
    64106696 
    else 
    67867072    st_runner "update-rc.d -f php5-fpm remove" &> /dev/null 
    67877073    st_runner "service php53-fpm stop" &> /dev/null 
    67887074    killall -9 php-fpm &> /dev/null 
     7075    msg "INFO: Restarting $_DB_SERVER server" 
     7076    st_runner "service mysql restart" &> /dev/null 
    67897077    st_runner "service php53-fpm start" &> /dev/null 
    67907078    st_runner "service nginx reload" &> /dev/null 
    67917079  fi 
    if [ ! -e "/root/.my.cnf" ] ; then 
    68127100      PXSWD="$_ESC_PASS" 
    68137101    fi 
    68147102    PASWD=`echo -n $PXSWD | tr -d "\n"` 
     7103    mysql -u root -e "FLUSH HOSTS;" &> /dev/null 
    68157104    mysql -u root -e "DELETE FROM mysql.user WHERE User='';" &> /dev/null 
    68167105    mysql -u root -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" &> /dev/null 
    68177106    mysql -u root -e "DROP DATABASE test;" &> /dev/null 
    if [ ! -e "/root/.my.cnf" ] ; then 
    68227111  mrun "sleep 1" 
    68237112  echo "[client]" > /root/.my.cnf 
    68247113  echo "user=root" >> /root/.my.cnf 
    6825   echo "password='$PASWD'" >> /root/.my.cnf 
     7114  echo "password=$PASWD" >> /root/.my.cnf 
    68267115  chmod 0600 /root/.my.cnf 
     7116  echo "db=mysql" > /root/.mytop 
     7117  chmod 0600 /root/.mytop 
    68277118  if [ "$_THIS_DB_HOST" = "localhost" ] ; then 
    68287119    echo "skip-name-resolve" > /etc/mysql/skip-name-resolve.txt 
    68297120  else 
    else 
    68557146  if [ ! -z "$_ESC_PASS" ] ; then 
    68567147    cp -af /root/.my.cnf /root/.my.cnf-pre-$_INSTALLER_VERSION-$_NOW 
    68577148    cp -af /root/.my.pass.txt /root/.my.pass.txt-pre-$_INSTALLER_VERSION-$_NOW 
     7149    mysql -u root -e "FLUSH HOSTS;" &> /dev/null 
    68587150    mysql -u root -e "DELETE FROM mysql.user WHERE User='';" &> /dev/null 
    68597151    mysql -u root -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" &> /dev/null 
    68607152    mysql -u root -e "DROP DATABASE test;" &> /dev/null 
    else 
    68637155    mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    68647156    echo "[client]" > /root/.my.cnf 
    68657157    echo "user=root" >> /root/.my.cnf 
    6866     echo "password='$_ESC_PASS'" >> /root/.my.cnf 
     7158    echo "password=$_ESC_PASS" >> /root/.my.cnf 
    68677159    chmod 0600 /root/.my.cnf 
     7160    echo "db=mysql" > /root/.mytop 
     7161    chmod 0600 /root/.mytop 
    68687162    echo "$_ESC_PASS" > /root/.my.pass.txt 
    68697163    echo " " 
    68707164    if [ "$_STRONG_PASSWORDS" = "YES" ] ; then 
    msg "INFO: New entry added to /var/log/barracuda_log.txt" 
    69017195 
    69027196 
    69037197###--------------------### 
    6904 if [ ! -e "/var/log/sysctl.conf.vm.swap.tuned.log" ] ; then 
     7198if [ ! -e "/var/log/sysctl.conf.vm.swap.cache.tuned.log" ] ; then 
    69057199  cp -af /etc/sysctl.conf /etc/sysctl.conf-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
    69067200  cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/sysctl.conf /etc/sysctl.conf 
    6907   /sbin/sysctl -p &> /dev/null 
    6908   sysctl vm.swappiness=20 &> /dev/null 
    6909   sysctl kernel.randomize_va_space=2 &> /dev/null 
    6910   sysctl net.ipv4.tcp_syncookies=1 &> /dev/null 
    6911   touch /var/log/sysctl.conf.vm.swap.tuned.log 
    69127201  if [ -e "/boot/grub/menu.lst" ] ; then 
    69137202    msg "INFO: Cleaning up system swap, it may take a moment, please wait..." 
    69147203    mrun "sleep 1" 
    6915     echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf 
    6916     sysctl vm.overcommit_memory=1 &> /dev/null 
     7204    echo "vm.overcommit_memory = 0" >> /etc/sysctl.conf 
     7205    sysctl -p /etc/sysctl.conf &> /dev/null 
    69177206    st_runner "swapoff -a" &> /dev/null 
    69187207    st_runner "swapon -a" &> /dev/null 
     7208  else 
     7209    sysctl -p /etc/sysctl.conf &> /dev/null 
    69197210  fi 
     7211  touch /var/log/sysctl.conf.vm.swap.cache.tuned.log 
    69207212fi 
    69217213APTEMAIL=${_MY_EMAIL//\@/\\\@} 
    69227214XPTEMAIL=${_MY_EMAIL//\@/\\\\\@} 
    sed -i "s/root/$_MY_EMAIL/g" /etc/apticron/apticron.conf &> /dev/n 
    69267218sed -i "s/notify\\\@omega8.cc/$XPTEMAIL/g" /var/xdrago/checksql.cgi &> /dev/null 
    69277219sed -i "s/notify\\\@omega8.cc/$XPTEMAIL/g" /var/xdrago/usage.sh &> /dev/null 
    69287220sed -i "s/notify\\\@omega8.cc/$XPTEMAIL/g" /var/xdrago/monitor/check/segfault_alert &> /dev/null 
     7221sed -i "s/notify\\\@omega8.cc/$XPTEMAIL/g" /var/xdrago/monitor/check/escapecheck &> /dev/null 
    69297222if [ -e "/usr/sbin/apticron" ] ; then 
    69307223  if [[ "$_INSTALLER_VERSION" =~ "dev" ]] && [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    6931     sed -i "s/aptitude full-upgrade/barracuda up-head/g" /usr/sbin/apticron &> /dev/null 
    6932     sed -i "s/apt-get dist-upgrade/barracuda up-head/g" /usr/sbin/apticron &> /dev/null 
     7224    sed -i "s/aptitude full-upgrade/barracuda up-head system/g" /usr/sbin/apticron &> /dev/null 
     7225    sed -i "s/apt-get dist-upgrade/barracuda up-head system/g" /usr/sbin/apticron &> /dev/null 
     7226    sed -i "s/barracuda up-head.*/barracuda up-head system/g" /usr/sbin/apticron &> /dev/null 
    69337227  else 
    6934     sed -i "s/aptitude full-upgrade/barracuda up-stable/g" /usr/sbin/apticron &> /dev/null 
    6935     sed -i "s/apt-get dist-upgrade/barracuda up-stable/g" /usr/sbin/apticron &> /dev/null 
     7228    sed -i "s/aptitude full-upgrade/barracuda up-stable system/g" /usr/sbin/apticron &> /dev/null 
     7229    sed -i "s/apt-get dist-upgrade/barracuda up-stable system/g" /usr/sbin/apticron &> /dev/null 
     7230    sed -i "s/barracuda up-stable.*/barracuda up-stable system/g" /usr/sbin/apticron &> /dev/null 
    69367231  fi 
    69377232fi 
    69387233if [ "$_STATUS" = "INIT" ] ; then 
    if [ "$_STATUS" = "INIT" ] ; then 
    69767271  fi 
    69777272  force_advanced_nginx_config 
    69787273  mrun "sleep 8" 
    6979   service nginx restart &> /dev/null 
     7274  st_runner "service nginx restart" &> /dev/null 
    69807275else 
    69817276  if [ -e "/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf" ] && [ ! -e "/var/log/nginx-ssl-fixed-$_INSTALLER_VERSION" ] ; then 
    69827277    sed -i "s/SSLv3 TLSv1;/SSLv3 TLSv1 TLSv1.1 TLSv1.2;/g" /var/aegir/config/server_master/nginx/pre.d/* &> /dev/null 
    69837278    sed -i "s/HIGH:\!ADH:\!MD5;/RC4:HIGH:\!aNULL:\!MD5;/g" /var/aegir/config/server_master/nginx/pre.d/* &> /dev/null 
    69847279    touch /var/log/nginx-ssl-fixed-$_INSTALLER_VERSION 
    69857280  fi 
    6986   service nginx reload &> /dev/null 
     7281  st_runner "service nginx reload" &> /dev/null 
    69877282fi 
    69887283 
    69897284 
    if [ -e "/etc/csf/csf.deny" ] && [ -e "/usr/sbin/csf" ] && [ -e "/var/xdrago/gue 
    71347429  sed -i "s/.*fire.*//g" /etc/crontab &> /dev/null 
    71357430  sed -i "s/.*water.*//g" /etc/crontab &> /dev/null 
    71367431  if [[ "$_THISHOST" =~ ".host8." ]] ; then 
    7137     if [ -e "/opt/fire.sh" ] && [ -e "/opt/water.sh" ] ; then 
     7432    if [ "$_VMFAMILY" = "VS" ] ; then 
     7433      true 
     7434    else 
    71387435      echo "*/1 * * * *   root    bash /var/xdrago/guest-fire.sh >/dev/null 2>&1" >> /etc/crontab 
    71397436      echo "01  * * * *   root    bash /var/xdrago/guest-water.sh >/dev/null 2>&1" >> /etc/crontab 
    71407437    fi 
    if [ -e "/etc/csf/csf.deny" ] && [ -e "/usr/sbin/csf" ] && [ -e "/var/xdrago/gue 
    71437440    echo "01  * * * *   root    bash /var/xdrago/guest-water.sh >/dev/null 2>&1" >> /etc/crontab 
    71447441  fi 
    71457442  sed -i "/^$/d" /etc/crontab &> /dev/null 
     7443else 
     7444  sed -i "s/.*fire.*//g" /etc/crontab &> /dev/null 
     7445  sed -i "s/.*water.*//g" /etc/crontab &> /dev/null 
     7446  sed -i "/^$/d" /etc/crontab &> /dev/null 
    71467447fi 
    71477448killall -9 memcached     &> /dev/null 
    71487449chmod 0750 /sbin/audispd &> /dev/null 
  • BOA.sh.txt

    diff --git a/BOA.sh.txt b/BOA.sh.txt
    index dd502f8..ff0d80c 100644
    a b setup () 
    7575 
    7676###--------------------### 
    7777if [ `whoami` = "root" ] ; then 
     78  chmod a+w /dev/null 
    7879  setup 
    7980  exit 0 
    8081else 
  • CHANGELOG.txt

    diff --git a/CHANGELOG.txt b/CHANGELOG.txt
    index 1e9cc21..d324f94 100644
    a b  
    11 
     2### Stable BOA-2.0.9 Release - Barracuda Edition 
     3### Date: Thu May  9 11:25:59 EDT 2013 
     4### Includes Aegir from BOA-2.0.8 Edition 
     5 
     6# This is the first Barracuda-only Edition, released to address important 
     7  security issue with Nginx server and provide system level upgrades. 
     8 
     9  This Edition will not upgrade Aegir Master nor Aegir Satellite Instances, 
     10  because there was no new Drupal core released since BOA-2.0.8 Edition and 
     11  there were not enough updates to built-in platforms or contrib accumulated. 
     12 
     13  Releasing Barracuda-only Edition separately from full Edition allows us 
     14  to address system/services security issues without any extra delay, 
     15  while releasing Octopus-only Edition will allow us to provide Drupal core 
     16  or Aegir version upgrades, without affecting system level services. 
     17 
     18  There is also another reason why separate releases will be useful. 
     19  BOA-2.0.9 is the last Edition where Aegir 2.x uses still old Drush 4.6 
     20  in the backend. We need to sync BOA specific Aegir 2.x with upstream 
     21  and finally switch to Drush 5, or even Drush 6, if possible. 
     22 
     23  This change, however, may cause issues if you still host legacy Drupal 5 
     24  or some old Drupal 6 sites, with either core or contrib not compatible 
     25  with PHP 5.3, which is now used by default. 
     26 
     27  That is why we plan to introduce ability to install older/previous 
     28  Barracuda and/or Octopus release, if you need more time to upgrade. 
     29 
     30# New features and enhancements in this release: 
     31 
     32  * Debian 7.0 Wheezy support. 
     33  * Automated upgrade from Squeeze with _SQUEEZE_TO_WHEEZY=YES option. 
     34  * Added config template with inline how-to in docs/cnf/barracuda.cnf 
     35  * Added config template with inline how-to in docs/cnf/octopus.cnf 
     36  * Added passwords encryption how-to in docs/BLOWFISH.txt 
     37  * Added the list of symbols used on install in docs/PLATFORMS.txt 
     38  * Forced mysql restart if there are too many high CPU mysqld processes. 
     39  * Improved docs/NOTES.txt 
     40  * Improved docs/README.txt 
     41  * Install libpam-unix2 and libxcrypt1 by default. 
     42  * Install s3cmd by default. 
     43  * Issue #1974640 - Allow to use Midnight Commander for limited shell users. 
     44  * Limited Shell Logs Monitor enabled by default. 
     45  * Nginx: Check for Linux/Cdorked.A malware and delete if discovered. 
     46  * Re-generate and sync Aegir passwords before and after instance upgrade. 
     47  * The silent 'system' mode documented in docs/UPGRADE.txt 
     48  * Allow to exclude platform from otherwise forced `drush en entitycache -y` 
     49    if sites/all/modules/entitycache_dont_enable.info control file is present. 
     50 
     51# Changes in this release: 
     52 
     53  * Nginx 1.5.0 - security upgrade for CVE-2013-2028 
     54  * PHP 5.3.25 
     55  * Redis 2.6.13 
     56  * Do not disable update module in platforms known to include it as required. 
     57  * Firewall: Open port 1129 for outgoing connections (some gateways need it). 
     58  * Force syslog module as disabled by default and save some disk I/O. 
     59  * Tune kernel to always use max RAM and not swap, if possible. 
     60 
     61# Fixes in this release: 
     62 
     63  * Add outgoing port 25 SMTP to the list of requirements. 
     64  * Firewall: Add truly permanent block for heavy abusers. 
     65  * Fix for mytop support, available again on systems with MariaDB. 
     66  * Fix permissions in the /data/all tree if required. 
     67  * Fix the order of checks - they scan only the last (current) minute. 
     68  * Force _STRONG_PASSWORDS=NO if locales still look broken on second check. 
     69  * Improve detecting no longer running drush.php and/or cron PHP processes. 
     70  * Improve fix_locales logic. 
     71  * Improve global.inc symlinking on initial install and upgrade. 
     72  * Improve messages displayed when fix_locales discovers broken locales. 
     73  * Improve monitoring to avoid duplicate entries on low traffic systems. 
     74  * Improve sanitize_string() filtering to avoid issues with strong passwords. 
     75  * Improve syncpass tool - Update system user passwd and flush privileges. 
     76  * Issue #1961226 - Warning: Could not change permissions of sites/all to 751. 
     77  * Issue #1962458 - 403 for anonymous users on node/add. 
     78  * Issue #1963044 - Force UTF-8 locales if not present/configured properly. 
     79  * Issue #1974542 - Use /root/.home.no.wildcard.chmod.cnf control file. 
     80  * Issue #1987936 - Restore ability to install PHP 5.2 for FPM and CLI. 
     81  * Make sure that /dev/null is writable for everyone. 
     82  * Make sure that all drushrc.php files are owned by Aegir system user. 
     83  * Make sure that all expected sites/all/{modules,themes,libraries} dirs exist. 
     84  * Make sure that DB server is restarted on upgrade after config tuning. 
     85  * Make sure that pdnsd and resolvconf are properly installed. 
     86  * Nginx: Remove duplicate Vary: Accept-Encoding headers. 
     87  * Percona no longer supports older Ubuntu non-LTS releases. 
     88  * PHP: Do not reload FPM every hour - it may cause error 502. 
     89  * PHP: Fix paths depending on CLI version used. 
     90  * PHP: Fix the extensions installation and upgrade logic. 
     91  * PHP: Make sure that the FPM port is set correctly for D6 sites with 5.2 
     92  * PHP: Properly uninstall all related packages when using source build. 
     93  * PHP: Start more FPM workers on systems with enough RAM by default. 
     94  * Purge bin logs before disabling them. 
     95  * Run NewRelic re-install early enough to avoid locking full-upgrade. 
     96  * Sync the load limits for spiders and backend tasks. 
     97  * The Java/Jetty monitor should use higher allowed limits by default. 
     98  * Update apticron message to recommend system mode instead of full upgrade. 
     99  * Update docs for _BUILD_FROM_SRC option. 
     100  * Use aggressive enough Jetty restart procedure on nightly services reload. 
     101  * Use correct status messages on install and upgrade. 
     102  * Use installer and not Aegir version download on stable install/upgrade. 
     103 
     104 
    2105### Stable Edition BOA-2.0.8 
    3106### Date: Mon Apr  8 01:41:36 CEST 2013 
    4107### Installs Aegir 2.x 
  • OCTOPUS.sh.txt

    diff --git a/OCTOPUS.sh.txt b/OCTOPUS.sh.txt
    index f1271a6..85ac0d4 100755
    a b _REMOTE_CACHE_IP=127.0.0.1 
    466466### You should use this option only when you 
    467467### already used it with initial Barracuda 
    468468### install. It will override any defined 
    469 ### above _MY_OWNIP value, disable DNS test 
    470 ### and enable drush debug mode automatically. 
     469### above _MY_OWNIP value and disable DNS test 
     470### automatically. 
    471471### 
    472472_LOCAL_NETWORK_IP="" 
    473473 
    _STRONG_PASSWORDS=NO 
    506506### DON'T EDIT ANYTHING BELOW THIS LINE    ### 
    507507###----------------------------------------### 
    508508 
    509 _INSTALLER_VERSION=BOA-2.0.8 
     509_INSTALLER_VERSION=BOA-2.0.9 
    510510 
    511511### 
    512512### Variables 
    _CIVICRM_PN=boa-2.0.8-dev 
    542542_CIVICRM6=3.4.8 
    543543_COD=6.x-1.0-rc2 
    544544_COM_MERCE=7.x-2.6 
    545 _COMMERCE=7.x-1.16 
     545_COMMERCE=7.x-1.18 
    546546_D6COMMONS=6.x-2.12 
    547547_D7COMMONS=7.x-3.2 
    548548_DRUPAL5=5.23.50 
    _MARTPLUG=7.x-1.x-dev 
    556556_NODESTREAM6=6.x-1.5 
    557557_NODESTREAM7=7.x-2.0-rc5 
    558558_OCTOPUS_VIDEO=1.0-alpha6 
    559 _OPEN_DEALS=1.19 
     559_OPEN_DEALS=1.20 
    560560_OPENACADEMY=7.x-1.0-beta3 
    561561_OPENATRIUM=6.x-1.7 
    562562_OPENCHURCH=7.x-1.11-beta9 
    563 _OPENDEALS=7.x-1.19 
     563_OPENDEALS=7.x-1.20 
    564564_OPENENTERPRISE=7.x-1.0-rc3 
    565 _OPENOUTREACH=7.x-1.0-rc10 
     565_OPENOUTREACH=7.x-1.0-rc11 
    566566_OPENPUBLIC=beta3-build100 
    567567_OPENPUBLISH=7.x-1.0-beta7 
    568568_OPENSCHOLAR=2.0-rc1 
    sub_force_advanced_nginx_config_main () { 
    823823      else 
    824824        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null 
    825825      fi 
     826    else 
     827      if [ "$_USE_STOCK" = "NO" ] ; then 
     828        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null 
     829      else 
     830        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null 
     831      fi 
    826832    fi 
    827833  fi 
    828834} 
    _STATUS=INIT 
    10671073# 
    10681074# Make sure it is running as root 
    10691075if [ `whoami` = "root" ] ; then 
    1070   true 
     1076  chmod a+w /dev/null 
    10711077else 
    10721078  msg "ERROR: This script should be ran as a root user - please `sudo -i` first" 
    10731079  msg "Bye" 
    if [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    12331239    cd /opt/tmp 
    12341240  fi 
    12351241else 
    1236   wget -q -U iCab http://files.aegir.cc/versions/nginx-for-drupal-$_AEGIR_VERSION.tar.gz 
    1237   gunzip -q -c nginx-for-drupal-$_AEGIR_VERSION.tar.gz | tar -xf - 
    1238   rm -f nginx-for-drupal-$_AEGIR_VERSION.tar.gz 
     1242  wget -q -U iCab http://files.aegir.cc/versions/nginx-for-drupal-$_INSTALLER_VERSION.tar.gz 
     1243  gunzip -q -c nginx-for-drupal-$_INSTALLER_VERSION.tar.gz | tar -xf - 
     1244  rm -f nginx-for-drupal-$_INSTALLER_VERSION.tar.gz 
    12391245  _BOA_REPO_NAME="nginx-for-drupal" 
    12401246fi 
    12411247if [ ! -e "/opt/tmp/$_BOA_REPO_NAME/aegir/helpers/apt.conf.noninteractive" ] ; then 
  • README.txt

    diff --git a/README.txt b/README.txt
    index b08d4e1..57b072a 100644
    a b to the standard production settings. 
    7474### SUPPORTED LTS OS 32/64bit - minimal on server or desktop on localhost 
    7575 
    7676* Debian 6.0 Squeeze (recommended) - 12 min install, 3 min upgrade 
     77* Debian 7.0 Wheezy - 30 min install, 15 min upgrade 
    7778* Ubuntu Precise 12.04 - 12 min install, 3 min upgrade 
    7879* Ubuntu Lucid 10.04 - 30 min install, 15 min upgrade 
    7980 
    NOTE: Average time to install and upgrade tested with PHP 5.3 option 
    9596### OTHER REQUIREMENTS 
    9697 
    9798* The Git standard port 9418 must be open. 
     99* SMTP standard port 25 (or SMTP relay) must be open for outgoing connections. 
    98100* Minimum 512 MB of RAM. 
     101* Locales with UTF-8 support, otherwise en_US.UTF-8 (default) is forced. 
    99102* Basic sysadmin skills and experience. 
    100103 
    101104 
    102105### PROVIDES 
    103106 
     107=== Included by default - see docs/NOTES.txt for details 
     108 
    104109* All libraries & tools required to install and run Nginx based Aegir system. 
    105 * Latest release of MariaDB 5.5 or Percona 5.5 database server. 
    106 * Latest version of Nginx web server with upload progress and Boost support. 
    107 * PHP-FPM 5.3.23 with APC, phpredis, uploadprogress and ionCube. 
    108 * PHP-FPM 5.2.17 with APC, phpredis, uploadprogress and ionCube. 
    109 * Redis cache server with standard DB auto-failover. 
    110 * New Relic Server and Apps Monitor with per Site/Instance/Server reporting. 
     110* Latest release of MariaDB 5.5 database server with Chive manager. 
     111* Latest version of Nginx web server. 
     112* PHP-FPM 5.3.25 with APC, phpredis, uploadprogress and ionCube. 
     113* Fast Redis Cache with DB auto-failover for all 6.x and 7.x platforms. 
     114* Fast proxy DNS server (pdnsd) with permanent caching. 
     115* Limited shell, SFTP and FTPS separate accounts per Octopus instance. 
     116* Limited Shell and FTPS accounts per Aegir Client with per site access. 
     117* Drush and Drush Make access - drush4, drush5 and drush6 on command line. 
     118* HTTPS access with self-signed certificate for all hosted sites. 
     119* Magic Speed Booster cache, working like a Boost + AuthCache, but per user. 
    111120* Entry level XSS built-in protection on the Nginx level. 
     121* Firewall csf/lfd integrated with Nginx abuse guard. 
     122* PHP errors debugging, including WSOD, enabled on the fly on dev. aliases. 
     123* Boost, AdvAgg, Domain Access and Drupal for Facebook built-in support. 
     124* Built-in collection of useful modules available in all platforms. 
    112125* Autonomous Maintenance & Auto-Healing scripts in /var/xdrago. 
     126* Every 10 seconds uptime/self-healing local monitoring. 
    113127* Automated, rotated daily backups for all databases in /data/disk/arch/sql. 
    114 * MultiCore Apache Solr 1.4.1 with Jetty 7 (optional). 
    115 * MultiCore Apache Solr 3.6.2 with Jetty 8 (optional). 
    116 * MultiCore Apache Solr 4.2.0 with Jetty 8 or 9 on Precise (optional). 
    117 * Fast proxy DNS server (pdnsd) with permanent caching. 
    118 * Bind9 DNS server integrated with experimental Aegir DNS feature (optional). 
    119 * Webmin Control Panel (optional). 
    120 * Compass Tools (optional). 
    121 * Firewall csf/lfd integrated with Nginx abuse guard (optional). 
    122 * Chive database manager in "chive." subdomain (optional). 
    123 * SQL Buddy database manager in "sqlbuddy." subdomain (optional). 
    124 * Collectd server monitor in "cgp." subdomain (optional). 
    125 * Limited shell, SFTP and FTPS separate accounts per Octopus instance. 
    126 * Limited shell and FTPS separate accounts per Aegir Client/Developer. 
     128 
     129=== Optional add-ons - see docs/NOTES.txt for details 
     130 
     131* MultiCore Apache Solr 1.4.1 with Jetty 7 - see docs/SOLR.txt for details. 
     132* MultiCore Apache Solr 3.6.2 with Jetty 8 - see docs/SOLR.txt for details. 
     133* MultiCore Apache Solr 4.2.0 with Jetty 8 or Jetty 9 on Precise and Wheezy. 
     134* Fast Redis Lock support with DB auto-failover for all 6.x and 7.x platforms. 
     135* Latest release of Percona 5.5 database server. 
     136* New Relic Server and Apps Monitor with per Site/Instance/Server reporting. 
     137* LDAP Nginx support via third-party module. 
     138* MongoDB driver for PHP 5.3 
     139* GEOS extension for PHP 5.3 (experimental). 
     140* FFmpeg support. 
     141* PHP-FPM 5.2.17 with APC, phpredis, uploadprogress and ionCube (deprecated). 
     142* Bind9 DNS server. 
     143* Webmin Control Panel. 
     144* SQL Buddy database manager. 
     145* Collectd server monitor. 
     146* Compass Tools. 
    127147 
    128148 
    129149### OCTOPUS PLATFORMS 
    Octopus can install the platforms listed below: 
    133153### Drupal 7.22.1 
    134154 
    135155 CiviCRM 4.2.8 ---------------- http://civicrm.org 
    136  Commerce 1.16 ---------------- http://drupal.org/project/commerce_kickstart 
     156 Commerce 1.18 ---------------- http://drupal.org/project/commerce_kickstart 
    137157 Commerce 2.6 ----------------- http://drupal.org/project/commerce_kickstart 
    138158 Commons 3.2 ------------------ http://drupal.org/project/commons 
    139159 Drupal 7.22.1 ---------------- http://drupal.org/drupal-7.22 
    140160 NodeStream 2.0-rc5 ----------- http://drupal.org/project/nodestream 
    141  Open Deals 1.19 -------------- http://drupal.org/project/opendeals 
    142  Open Outreach 1.0-rc10 ------- http://drupal.org/project/openoutreach 
     161 Open Deals 1.20 -------------- http://drupal.org/project/opendeals 
     162 Open Outreach 1.0-rc11 ------- http://drupal.org/project/openoutreach 
    143163 OpenChurch 1.11-beta9 -------- http://drupal.org/project/openchurch 
    144164 OpenPublish 3.0-beta7 -------- http://drupal.org/project/openpublish 
    145  Panopoly 1.0-rc4a ------------ http://drupal.org/project/panopoly 
     165 Panopoly 1.0-rc4 ------------- http://drupal.org/project/panopoly 
    146166 Ubercart 3.4.1 --------------- http://drupal.org/project/ubercart 
    147167 
    148168### Pressflow 6.28.1 
    as [D6] and/or [D7]. 
    227247Contrib: 
    228248 
    229249 admin ---------------------- [D6,D7] --- [S] [B] [SE] 
    230  advagg --------------------- [D6] ------ [S] 
     250 advagg --------------------- [D6,D7] --- [S] 
    231251 ais ------------------------ [D7] ------ [S] 
    232252 audio ---------------------- [D5,D6] --- [S] 
    233253 backup_migrate ------------- [D6,D7] --- [S] [B] 
    Contrib: 
    250270 filefield_nginx_progress --- [D6,D7] --- [S] [B] 
    251271 flood_control -------------- [D7] ------ [S] [B] 
    252272 fpa ------------------------ [D6,D7] --- [S] [B] 
     273 httprl --------------------- [D6,D7] --- [S] [B] 
    253274 imagecache ----------------- [D6,D7] --- [S] 
    254275 imagecache_external -------- [D6,D7] --- [S] 
    255276 javascript_aggregator ------ [D6] -------------- [FD] 
    Contrib: 
    257278 login_security ------------- [D6,D7] --- [S] [B] 
    258279 nocurrent_pass ------------- [D7] ------ [S] [B] 
    259280 performance ---------------- [D6,D7] ----------- [FD] 
     281 phpass --------------------- [D6] ------ [S] [B] 
    260282 poormanscron --------------- [D6] -------------- [FD] 
    261283 private_upload ------------- [D6] ------ [S] [B] 
    262284 purge ---------------------- [D6,D7] ----------- [FD] 
    Core: 
    285307 cookie_cache_bypass -------- [D6] -------------- [FD] 
    286308 dblog ---------------------- [D6,D7] ----------- [FD] 
    287309 path_alias_cache ----------- [D6] -------------- [FE] 
    288  syslog --------------------- [D6,D7] ----------- [FE] 
     310 syslog --------------------- [D6,D7] ----------- [FD] 
    289311 
    290312Drush [E]xtensions [M]aster [S]atellite: 
    291313 
  • new file aegir/conf/barracuda-release.txt

    diff --git a/aegir/conf/barracuda-release.txt b/aegir/conf/barracuda-release.txt
    new file mode 100644
    index 0000000..e387105
    - +  
     1BOA-2.0.9 
  • new file aegir/conf/barracuda-version.txt

    diff --git a/aegir/conf/barracuda-version.txt b/aegir/conf/barracuda-version.txt
    new file mode 100644
    index 0000000..e387105
    - +  
     1BOA-2.0.9 
  • aegir/conf/boa.bashrc.txt

    diff --git a/aegir/conf/boa.bashrc.txt b/aegir/conf/boa.bashrc.txt
    index 7fcc515..2cd0f69 100644
    a b  
    11#------------------------------------------------------------- 
    2 # BOA-2.0.8 default .bashrc 
     2# BOA-2.0.9 default .bashrc 
    33#------------------------------------------------------------- 
    44 
    55ulimit -S -c 0 
  • aegir/conf/csf.conf

    diff --git a/aegir/conf/csf.conf b/aegir/conf/csf.conf
    index cd83468..75cf7ff 100644
    a b AUTO_UPDATES = "0" 
    4040TCP_IN = "20,21,22,25,53,80,443,2401,5280,9418,30000:50000" 
    4141 
    4242# Allow outgoing TCP ports 
    43 TCP_OUT = "20,21,22,25,53,80,110,143,443,465,587,873,993,995,2401,3306,5280,9418,11371,27017,30000:50000" 
     43TCP_OUT = "20,21,22,25,53,80,110,143,443,465,587,873,993,995,1129,2401,3306,5280,9418,11371,27017,30000:50000" 
    4444 
    4545# Allow incoming UDP ports 
    4646UDP_IN = "20,21,53,123,161,33434:33523" 
  • aegir/conf/etc-apt-preferences-debian.txt

    diff --git a/aegir/conf/etc-apt-preferences-debian.txt b/aegir/conf/etc-apt-preferences-debian.txt
    index e91047b..e8deaa8 100644
    a b Pin-Priority: 1003 
    55Package: * 
    66Pin: origin ftp.osuosl.org 
    77Pin-Priority: 1002 
    8  
    9 Package: nginx-extras redis-server php5-apc php5-cli php5-common php5-curl php5-dev php5-ffmpeg php5-fpm php5-gd php5-geoip php5-gmp php5-imagick php5-imap php5-json php5-ldap php5-mcrypt php5-mhash php5-mysql php-pear php5-sasl php5-sqlite php5-suhosin php5-xmlrpc php5-xsl 
    10 Pin: origin packages.dotdeb.org 
    11 Pin-Priority: 1001 
  • new file aegir/conf/etc-apt-preferences-squeeze.txt

    diff --git a/aegir/conf/etc-apt-preferences-squeeze.txt b/aegir/conf/etc-apt-preferences-squeeze.txt
    new file mode 100644
    index 0000000..1396935
    - +  
     1Package: * 
     2Pin: origin repo.percona.com 
     3Pin-Priority: 1003 
     4 
     5Package: * 
     6Pin: origin ftp.osuosl.org 
     7Pin-Priority: 1002 
     8 
     9Package: nginx-extras php5-apc php5-cli php5-common php5-curl php5-dev php5-ffmpeg php5-fpm php5-gd php5-geoip php5-gmp php5-imagick php5-imap php5-json php5-ldap php5-mcrypt php5-mhash php5-mysql php-pear php5-sasl php5-sqlite php5-suhosin php5-xmlrpc php5-xsl 
     10Pin: origin packages.dotdeb.org 
     11Pin-Priority: 1001 
  • new file aegir/conf/etc-apt-preferences-wheezy.txt

    diff --git a/aegir/conf/etc-apt-preferences-wheezy.txt b/aegir/conf/etc-apt-preferences-wheezy.txt
    new file mode 100644
    index 0000000..e8deaa8
    - +  
     1Package: * 
     2Pin: origin repo.percona.com 
     3Pin-Priority: 1003 
     4 
     5Package: * 
     6Pin: origin ftp.osuosl.org 
     7Pin-Priority: 1002 
  • aegir/conf/global.inc.aegir.txt

    diff --git a/aegir/conf/global.inc.aegir.txt b/aegir/conf/global.inc.aegir.txt
    index c28e6bc..36b8c31 100644
    a b if ($conf['install_profile'] == 'hostmaster' && isset($_SERVER['HTTP_USER_AGENT' 
    8787} 
    8888 
    8989$da_inc       = FALSE; 
     90$deny_anon    = FALSE; 
    9091$drupal_eight = FALSE; 
    9192$drupal_five  = FALSE; 
    9293$drupal_seven = FALSE; 
    if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['SERVER_NAME'])) { 
    374375      } 
    375376    } 
    376377 
    377     if (empty($known_bot) && !$high_traffic) { 
     378    if (!isset($_COOKIE[$test_sess_name])) { 
     379      if (preg_match("/\/(?:node\/[0-9]+\/edit|node\/add)/", $_SERVER['REQUEST_URI'])) { 
     380        if (!file_exists('sites/'. $_SERVER['SERVER_NAME'] .'/modules/allow_anon_node_add.info')) { 
     381          $deny_anon = TRUE; 
     382          header("HTTP/1.1 301 Moved Permanently"); 
     383          header("Location: http://" . $_SERVER['SERVER_NAME'] . "/"); 
     384        } 
     385      } 
     386      if (preg_match("/^\/(?:[a-z]{2}\/)?(?:admin|logout|privatemsg|approve)/", $_SERVER['REQUEST_URI'])) { 
     387        $deny_anon = TRUE; 
     388        header("HTTP/1.1 301 Moved Permanently"); 
     389        header("Location: http://" . $_SERVER['SERVER_NAME'] . "/"); 
     390      } 
     391    } 
     392 
     393    if (empty($known_bot) && !$high_traffic && !$deny_anon) { 
    378394      if (preg_match("/^\/(?:[a-z]{2}\/)?(?:user|admin|cart|checkout|logout|privatemsg)/", $_SERVER['REQUEST_URI']) || 
    379395          preg_match("/\/(?:node\/[0-9]+\/edit|node\/add|comment\/reply|approve|users|ajax_comments)/", $_SERVER['REQUEST_URI']) || 
    380396          preg_match("/(?:dev\.|devel\.)/", $_SERVER['HTTP_HOST'])) { 
  • aegir/conf/global.inc.ssl.aegir.txt

    diff --git a/aegir/conf/global.inc.ssl.aegir.txt b/aegir/conf/global.inc.ssl.aegir.txt
    index bf42bbd..189682e 100644
    a b if ($conf['install_profile'] == 'hostmaster' && isset($_SERVER['HTTP_USER_AGENT' 
    9595} 
    9696 
    9797$da_inc       = FALSE; 
     98$deny_anon    = FALSE; 
    9899$drupal_eight = FALSE; 
    99100$drupal_five  = FALSE; 
    100101$drupal_seven = FALSE; 
    if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['SERVER_NAME'])) { 
    382383      } 
    383384    } 
    384385 
    385     if (empty($known_bot) && !$high_traffic) { 
     386    if (!isset($_COOKIE[$test_sess_name])) { 
     387      if (preg_match("/\/(?:node\/[0-9]+\/edit|node\/add)/", $_SERVER['REQUEST_URI'])) { 
     388        if (!file_exists('sites/'. $_SERVER['SERVER_NAME'] .'/modules/allow_anon_node_add.info')) { 
     389          $deny_anon = TRUE; 
     390          header("HTTP/1.1 301 Moved Permanently"); 
     391          header("Location: http://" . $_SERVER['SERVER_NAME'] . "/"); 
     392        } 
     393      } 
     394      if (preg_match("/^\/(?:[a-z]{2}\/)?(?:admin|logout|privatemsg|approve)/", $_SERVER['REQUEST_URI'])) { 
     395        $deny_anon = TRUE; 
     396        header("HTTP/1.1 301 Moved Permanently"); 
     397        header("Location: http://" . $_SERVER['SERVER_NAME'] . "/"); 
     398      } 
     399    } 
     400 
     401    if (empty($known_bot) && !$high_traffic && !$deny_anon) { 
    386402      if (preg_match("/^\/(?:[a-z]{2}\/)?(?:user|admin|cart|checkout|logout|privatemsg)/", $_SERVER['REQUEST_URI']) || 
    387403          preg_match("/\/(?:node\/[0-9]+\/edit|node\/add|comment\/reply|approve|users|ajax_comments)/", $_SERVER['REQUEST_URI']) || 
    388404          preg_match("/(?:dev\.|devel\.)/", $_SERVER['HTTP_HOST'])) { 
  • new file aegir/conf/migration.html

    diff --git a/aegir/conf/migration.html b/aegir/conf/migration.html
    new file mode 100644
    index 0000000..1010ef8
    - +  
     1<html> 
     2<head> 
     3<title>Server Migration</title> 
     4<style type="text/css"> 
     5<!-- 
     6body { 
     7background-color: #ffffff; 
     8} 
     9--> 
     10</style> 
     11</head> 
     12<body> 
     13<table border="0" align="center" cellpadding="0" cellspacing="0"> 
     14<tr> 
     15<td  width="800" height="600" align="center" valign="middle"><p class="style1"><img src="/migration.jpg" alt="Server Migration" width="347" height="346" /></p> 
     16<h2>We are performing server migration and will be back shortly</h2> 
     17</td> 
     18</tr> 
     19</table> 
     20</body> 
     21</html> 
  • aegir/conf/nginx_legacy_include.conf

    diff --git a/aegir/conf/migration.jpg b/aegir/conf/migration.jpg
    new file mode 100644
    index 0000000..a0c3b7c
    Binary files /dev/null and b/aegir/conf/migration.jpg differ
    diff --git a/aegir/conf/nginx_legacy_include.conf b/aegir/conf/nginx_legacy_include.conf
    index d7f8cfe..047db14 100644
    a b location ~* /(?:ahah|ajax|batch|autocomplete|webform|done|progress/|x-progress-i 
    159159### node at /node/2/edit, if you know what are you doing. 
    160160### 
    161161location ^~ /hosting/c/server_master { 
     162  if ($cache_uid = '') { 
     163    return 403; 
     164  } 
     165  if ($is_bot) { 
     166    return 403; 
     167  } 
    162168  access_log off; 
    163169  rewrite ^ $scheme://$host/hosting/sites permanent; 
    164170} 
    location ^~ /hosting/c/server_master { 
    169175### node at /node/4/edit, if you know what are you doing. 
    170176### 
    171177location ^~ /hosting/c/server_localhost { 
     178  if ($cache_uid = '') { 
     179    return 403; 
     180  } 
     181  if ($is_bot) { 
     182    return 403; 
     183  } 
    172184  access_log off; 
    173185  rewrite ^ $scheme://$host/hosting/sites permanent; 
    174186} 
    location ^~ /hosting/c/server_localhost { 
    177189### Fix for Aegir & .info .pl domain extensions. 
    178190### 
    179191location ^~ /hosting { 
     192  if ($cache_uid = '') { 
     193    return 403; 
     194  } 
     195  if ($is_bot) { 
     196    return 403; 
     197  } 
    180198  access_log off; 
    181199  set $nocache_details "Skip"; 
    182200  try_files $uri @drupal; 
    location ^~ /admin/config/development/performance/redis { 
    202220### Support for backup_migrate module download/restore/delete actions. 
    203221### 
    204222location ^~ /admin { 
     223  if ($cache_uid = '') { 
     224    return 403; 
     225  } 
    205226  if ($is_bot) { 
    206227    return 403; 
    207228  } 
    location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin 
    546567### 
    547568### Serve & no-log static helper files used in some wysiwyg editors. 
    548569### 
    549 location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckeditor|tinymce)/.*\.(?:html?|xml)$ { 
     570location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckeditor|tinymce|videomanager)/.*\.(?:html?|xml)$ { 
    550571  if ($is_bot) { 
    551572    return 403; 
    552573  } 
    location ~* ^/(?:.*/)?(?:admin|user|cart|checkout|logout|flag|comment/reply) { 
    600621} 
    601622 
    602623### 
    603 ### Protect from DoS attempts and not logged in visitors on never cached uri. 
     624### Protect from DoS attempts on never cached uri. 
     625### 
     626location ~* ^/(?:.*/)?(?:node/[0-9]+/edit|node/add) { 
     627  if ($is_bot) { 
     628    return 403; 
     629  } 
     630  access_log off; 
     631  set $nocache_details "Skip"; 
     632  try_files $uri @drupal; 
     633} 
     634 
     635### 
     636### Protect from DoS attempts on never cached uri. 
    604637### 
    605 location ~* ^/(?:.*/)?(?:node/[0-9]+/edit|node/add|approve) { 
     638location ~* ^/(?:.*/)?(?:node/[0-9]+/delete|approve) { 
    606639  if ($cache_uid = '') { 
    607640    return 403; 
    608641  } 
  • aegir/conf/nginx_modern_include.conf

    diff --git a/aegir/conf/nginx_modern_include.conf b/aegir/conf/nginx_modern_include.conf
    index a6a61f3..7d1f59a 100644
    a b location ~* /(?:ahah|ajax|batch|autocomplete|webform|done|progress/|x-progress-i 
    174174### node at /node/2/edit, if you know what are you doing. 
    175175### 
    176176location ^~ /hosting/c/server_master { 
     177  if ($cache_uid = '') { 
     178    return 403; 
     179  } 
     180  if ($is_bot) { 
     181    return 403; 
     182  } 
    177183  access_log off; 
    178184  rewrite ^ $scheme://$host/hosting/sites permanent; 
    179185} 
    location ^~ /hosting/c/server_master { 
    184190### node at /node/4/edit, if you know what are you doing. 
    185191### 
    186192location ^~ /hosting/c/server_localhost { 
     193  if ($cache_uid = '') { 
     194    return 403; 
     195  } 
     196  if ($is_bot) { 
     197    return 403; 
     198  } 
    187199  access_log off; 
    188200  rewrite ^ $scheme://$host/hosting/sites permanent; 
    189201} 
    location ^~ /hosting/c/server_localhost { 
    192204### Fix for Aegir & .info .pl domain extensions. 
    193205### 
    194206location ^~ /hosting { 
     207  if ($cache_uid = '') { 
     208    return 403; 
     209  } 
     210  if ($is_bot) { 
     211    return 403; 
     212  } 
    195213  access_log off; 
    196214  set $nocache_details "Skip"; 
    197215  try_files $uri @drupal; 
    location ^~ /admin/config/development/performance/redis { 
    217235### Support for backup_migrate module download/restore/delete actions. 
    218236### 
    219237location ^~ /admin { 
     238  if ($cache_uid = '') { 
     239    return 403; 
     240  } 
    220241  if ($is_bot) { 
    221242    return 403; 
    222243  } 
    location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin 
    561582### 
    562583### Serve & no-log static helper files used in some wysiwyg editors. 
    563584### 
    564 location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckeditor|tinymce)/.*\.(?:html?|xml)$ { 
     585location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckeditor|tinymce|videomanager)/.*\.(?:html?|xml)$ { 
    565586  if ($is_bot) { 
    566587    return 403; 
    567588  } 
    location ~* ^/(?:.*/)?(?:admin|user|cart|checkout|logout|flag|comment/reply) { 
    615636} 
    616637 
    617638### 
    618 ### Protect from DoS attempts and not logged in visitors on never cached uri. 
     639### Protect from DoS attempts on never cached uri. 
     640### 
     641location ~* ^/(?:.*/)?(?:node/[0-9]+/edit|node/add) { 
     642  if ($is_bot) { 
     643    return 403; 
     644  } 
     645  access_log off; 
     646  set $nocache_details "Skip"; 
     647  try_files $uri @drupal; 
     648} 
     649 
     650### 
     651### Protect from DoS attempts on never cached uri. 
    619652### 
    620 location ~* ^/(?:.*/)?(?:node/[0-9]+/edit|node/add|approve) { 
     653location ~* ^/(?:.*/)?(?:node/[0-9]+/delete|approve) { 
    621654  if ($cache_uid = '') { 
    622655    return 403; 
    623656  } 
  • aegir/conf/nginx_octopus_include.conf

    diff --git a/aegir/conf/nginx_octopus_include.conf b/aegir/conf/nginx_octopus_include.conf
    index a54142f..a9c62a8 100644
    a b location = /cron.php { 
    9898  allow        127.0.0.1; 
    9999  deny         all; 
    100100  try_files    $uri =404; 
    101   fastcgi_pass 127.0.0.1:9090; 
     101  fastcgi_pass 127.0.0.1:9000; 
    102102} 
    103103 
    104104### 
    location = /core/cron.php { 
    112112  allow        127.0.0.1; 
    113113  deny         all; 
    114114  try_files    $uri =404; 
    115   fastcgi_pass 127.0.0.1:9090; 
     115  fastcgi_pass 127.0.0.1:9000; 
    116116} 
    117117 
    118118### 
    location ~* /(?:ahah|ajax|batch|autocomplete|webform|done|progress/|x-progress-i 
    174174### node at /node/2/edit, if you know what are you doing. 
    175175### 
    176176location ^~ /hosting/c/server_master { 
     177  if ($cache_uid = '') { 
     178    return 403; 
     179  } 
     180  if ($is_bot) { 
     181    return 403; 
     182  } 
    177183  access_log off; 
    178184  rewrite ^ $scheme://$host/hosting/sites permanent; 
    179185} 
    location ^~ /hosting/c/server_master { 
    184190### node at /node/4/edit, if you know what are you doing. 
    185191### 
    186192location ^~ /hosting/c/server_localhost { 
     193  if ($cache_uid = '') { 
     194    return 403; 
     195  } 
     196  if ($is_bot) { 
     197    return 403; 
     198  } 
    187199  access_log off; 
    188200  rewrite ^ $scheme://$host/hosting/sites permanent; 
    189201} 
    location ^~ /hosting/c/server_localhost { 
    192204### Fix for Aegir & .info .pl domain extensions. 
    193205### 
    194206location ^~ /hosting { 
     207  if ($cache_uid = '') { 
     208    return 403; 
     209  } 
     210  if ($is_bot) { 
     211    return 403; 
     212  } 
    195213  access_log off; 
    196214  set $nocache_details "Skip"; 
    197215  try_files $uri @drupal; 
    location ^~ /admin/config/development/performance/redis { 
    217235### Support for backup_migrate module download/restore/delete actions. 
    218236### 
    219237location ^~ /admin { 
     238  if ($cache_uid = '') { 
     239    return 403; 
     240  } 
    220241  if ($is_bot) { 
    221242    return 403; 
    222243  } 
    location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin 
    555576    return 403; 
    556577  } 
    557578  try_files    $uri =404; 
    558   fastcgi_pass 127.0.0.1:9090; 
     579  fastcgi_pass 127.0.0.1:9000; 
    559580} 
    560581 
    561582### 
    562583### Serve & no-log static helper files used in some wysiwyg editors. 
    563584### 
    564 location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckeditor|tinymce)/.*\.(?:html?|xml)$ { 
     585location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckeditor|tinymce|videomanager)/.*\.(?:html?|xml)$ { 
    565586  if ($is_bot) { 
    566587    return 403; 
    567588  } 
    location ~* ^/(?:.*/)?(?:admin|user|cart|checkout|logout|flag|comment/reply) { 
    615636} 
    616637 
    617638### 
    618 ### Protect from DoS attempts and not logged in visitors on never cached uri. 
     639### Protect from DoS attempts on never cached uri. 
     640### 
     641location ~* ^/(?:.*/)?(?:node/[0-9]+/edit|node/add) { 
     642  if ($is_bot) { 
     643    return 403; 
     644  } 
     645  access_log off; 
     646  set $nocache_details "Skip"; 
     647  try_files $uri @drupal; 
     648} 
     649 
     650### 
     651### Protect from DoS attempts on never cached uri. 
    619652### 
    620 location ~* ^/(?:.*/)?(?:node/[0-9]+/edit|node/add|approve) { 
     653location ~* ^/(?:.*/)?(?:node/[0-9]+/delete|approve) { 
    621654  if ($cache_uid = '') { 
    622655    return 403; 
    623656  } 
    location ~ ^/(?<esi>esi/.*)$ { 
    663696  ### 
    664697  fastcgi_param QUERY_STRING q=$esi; 
    665698  fastcgi_param SCRIPT_FILENAME $document_root/index.php; 
    666   fastcgi_pass  127.0.0.1:9090; 
     699  fastcgi_pass  127.0.0.1:9000; 
    667700  ### 
    668701  ### Use Nginx cache for all visitors. 
    669702  ### 
    location = /index.php { 
    769802  tcp_nopush    off; 
    770803  keepalive_requests 0; 
    771804  try_files     $uri =404; ### check for existence of php file first 
    772   fastcgi_pass  127.0.0.1:9090; 
     805  fastcgi_pass  127.0.0.1:9000; 
    773806  track_uploads uploads 60s; ### required for upload progress 
    774807  ### 
    775808  ### Use Nginx cache for all visitors. 
    location ~* ^/(?:core/)?(?:boost_stats|update|authorize|rtoc|xmlrpc|js)\.php$ { 
    803836  keepalive_requests 0; 
    804837  access_log   off; 
    805838  try_files    $uri =404; ### check for existence of php file first 
    806   fastcgi_pass 127.0.0.1:9090; 
     839  fastcgi_pass 127.0.0.1:9000; 
    807840} 
    808841 
    809842### 
  • new file aegir/conf/octopus-release.txt

    diff --git a/aegir/conf/octopus-release.txt b/aegir/conf/octopus-release.txt
    new file mode 100644
    index 0000000..e387105
    - +  
     1BOA-2.0.9 
  • new file aegir/conf/octopus-version.txt

    diff --git a/aegir/conf/octopus-version.txt b/aegir/conf/octopus-version.txt
    new file mode 100644
    index 0000000..e387105
    - +  
     1BOA-2.0.9 
  • aegir/conf/override.global.inc

    diff --git a/aegir/conf/override.global.inc b/aegir/conf/override.global.inc
    index 1e4ca5f..435d0a2 100644
    a b if (isset($_SERVER['HTTP_HOST']) && preg_match("/(?:domain\.com|another-domain\. 
    3939  } 
    4040  else { 
    4141    $base_url = 'http://' . $_SERVER['HTTP_HOST']; 
    42     if ($request_type == "SSL" && !preg_match("/(?:x-progress-id|ahah|filefield_nginx_progress\/*|tinybrowser|f?ckeditor|tinymce|autocomplete|ajax|batch|js\/.*)/", $_SERVER['REQUEST_URI'])) { 
     42    if ($request_type == "SSL" && !preg_match("/(?:x-progress-id|ahah|filefield_nginx_progress\/*|tinybrowser|f?ckeditor|tinymce|videomanager|autocomplete|ajax|batch|js\/.*)/", $_SERVER['REQUEST_URI'])) { 
    4343      header('X-Accel-Expires: 1'); 
    4444      // Note: never use header('X-Accel-Expires: 0'); to disable Speed Booster completely. 
    4545      // You always want that one second or you will be vulnerable to DoS attacks. 
  • aegir/conf/php.ini

    diff --git a/aegir/conf/php.ini b/aegir/conf/php.ini
    index 58b5291..78f0c43 100644
    a b safe_mode_protected_env_vars = LD_LIBRARY_PATH 
    247247; and below.  This directive makes most sense if used in a per-directory 
    248248; or per-virtualhost web server configuration file. This directive is 
    249249; *NOT* affected by whether Safe Mode is turned On or Off. 
    250 open_basedir = ".:/data:/mnt:/opt:/srv:/tmp:/usr:/var/aegir:/var/lib/collectd:/var/lib/nginx:/var/run:/var/second:/var/www:/bin:/usr/bin" 
     250open_basedir = ".:/data:/mnt:/opt:/srv:/tmp:/usr:/var/aegir:/var/lib/collectd:/var/lib/nginx:/var/run:/var/www:/var/second:/bin:/usr/bin" 
    251251 
    252252; This directive allows you to disable certain functions for security reasons. 
    253253; It receives a comma-delimited list of function names. This directive is 
  • aegir/conf/php53.ini

    diff --git a/aegir/conf/php53.ini b/aegir/conf/php53.ini
    index 93dd145..ba6edc5 100644
    a b safe_mode_protected_env_vars = LD_LIBRARY_PATH 
    376376; or per-virtualhost web server configuration file. This directive is 
    377377; *NOT* affected by whether Safe Mode is turned On or Off. 
    378378; http://php.net/open-basedir 
    379 open_basedir = ".:/data:/mnt:/opt:/srv:/tmp:/usr:/var/aegir:/var/lib/collectd:/var/lib/nginx:/var/run:/var/second:/var/www:/bin:/usr/bin" 
     379open_basedir = ".:/data:/mnt:/opt:/srv:/tmp:/usr:/var/aegir:/var/lib/collectd:/var/lib/nginx:/var/run:/var/www:/var/second:/bin:/usr/bin" 
    380380 
    381381; This directive allows you to disable certain functions for security reasons. 
    382382; It receives a comma-delimited list of function names. This directive is 
  • aegir/conf/release.txt

    diff --git a/aegir/conf/release.txt b/aegir/conf/release.txt
    index 0519f8a..e387105 100644
    a b  
    1 BOA-2.0.8 
     1BOA-2.0.9 
  • aegir/conf/setupmail.txt

    diff --git a/aegir/conf/setupmail.txt b/aegir/conf/setupmail.txt
    index 5539775..9168075 100644
    a b Chive Manager URL: https://166.84.6.231 
    112112You can also use any desktop SQL manager you prefer, if it 
    113113supports tunneling over standard SSH port 22, since there is 
    114114no remote access over mysql port 3306 available, for security and 
    115 performance reasons. 
     115performance reasons - video tutorial: http://bit.ly/om8rsql 
    116116 
    117117You can also manage your databases on command line, either 
    118118with supported Drush commands or directly with tools like 
  • aegir/conf/sysctl.conf

    diff --git a/aegir/conf/sysctl.conf b/aegir/conf/sysctl.conf
    index 4440872..bbd9ccf 100644
    a b net.core.netdev_max_backlog = 5000 
    7070net.ipv4.tcp_window_scaling = 1 
    7171 
    7272# Use swap only if there is high memory usage 
    73 vm.swappiness = 20 
     73vm.swappiness = 1 
     74vm.vfs_cache_pressure=50 
  • aegir/conf/upgrademail.txt

    diff --git a/aegir/conf/upgrademail.txt b/aegir/conf/upgrademail.txt
    index 60c4aa9..6d1d627 100644
    a b platforms and features to help you manage your Drupal sites. 
    2525=== IMPORTANT CHANGES IN THIS UPGRADE 
    2626 
    2727* We are changing default PHP-FPM version used by all Drupal 6 sites to the 
    28   new PHP-FPM 5.3.23 and deprecate PHP-FPM 5.2.17, which is now used only 
     28  new PHP-FPM 5.3.24 and deprecate PHP-FPM 5.2.17, which is now used only 
    2929  for remaining Drupal 5 sites, if hosted. 
    3030 
    3131  We also no longer update/rebuild existing PHP 5.2.17 version. 
    platforms and features to help you manage your Drupal sites. 
    163163  ### Drupal 7.22.1 
    164164 
    165165  CiviCRM 4.2.8 ---------------- http://civicrm.org 
    166   Commerce 1.16 ---------------- http://drupal.org/project/commerce_kickstart 
     166  Commerce 1.18 ---------------- http://drupal.org/project/commerce_kickstart 
    167167  Commerce 2.6 ----------------- http://drupal.org/project/commerce_kickstart 
    168168  Drupal 7.22.1 ---------------- http://drupal.org/drupal-7.22 
    169169  NodeStream 2.0-rc5 ----------- http://drupal.org/project/nodestream 
    170   Open Deals 1.19 -------------- http://drupal.org/project/opendeals 
    171   Open Outreach 1.0-rc10 ------- http://drupal.org/project/openoutreach 
     170  Open Deals 1.20 -------------- http://drupal.org/project/opendeals 
     171  Open Outreach 1.0-rc11 ------- http://drupal.org/project/openoutreach 
    172172  OpenChurch 1.11-beta9 -------- http://drupal.org/project/openchurch 
    173   Panopoly 1.0-rc4a ------------ http://drupal.org/project/panopoly 
     173  Panopoly 1.0-rc4 ------------- http://drupal.org/project/panopoly 
    174174  Ubercart 3.4.1 --------------- http://drupal.org/project/ubercart 
    175175 
    176176  ### Pressflow 6.28.1 
  • aegir/conf/version.txt

    diff --git a/aegir/conf/version.txt b/aegir/conf/version.txt
    index 0519f8a..e387105 100644
    a b  
    1 BOA-2.0.8 
     1BOA-2.0.9 
  • new file aegir/helpers/dump_cdorked_config.c

    diff --git a/aegir/helpers/dump_cdorked_config.c b/aegir/helpers/dump_cdorked_config.c
    new file mode 100644
    index 0000000..74b2b86
    - +  
     1// This program dumps the content of a shared memory block 
     2// used by Linux/Cdorked.A into a file named httpd_cdorked_config.bin 
     3// when the machine is infected. 
     4// 
     5// Some of the data is encrypted. If your server is infected and you 
     6// would like to help, please send the httpd_cdorked_config.bin 
     7// and your httpd executable to our lab for analysis. Thanks! 
     8// 
     9// Build with gcc -o dump_cdorked_config dump_cdorked_config.c 
     10// 
     11// Marc-Etienne M.Léveillé <leveille@eset.com> 
     12// 
     13 
     14#include <stdio.h> 
     15#include <sys/shm.h> 
     16 
     17#define CDORKED_SHM_SIZE (6118512) 
     18#define CDORKED_OUTFILE "httpd_cdorked_config.bin" 
     19 
     20int main (int argc, char *argv[]) { 
     21    int maxkey, id, shmid, infected = 0; 
     22    struct shm_info shm_info; 
     23    struct shmid_ds shmds; 
     24    void * cdorked_data; 
     25    FILE * outfile; 
     26     
     27    maxkey = shmctl(0, SHM_INFO, (void *) &shm_info); 
     28    for(id = 0; id <= maxkey; id++) { 
     29        shmid = shmctl(id, SHM_STAT, &shmds); 
     30        if (shmid < 0) 
     31            continue; 
     32         
     33        if(shmds.shm_segsz == CDORKED_SHM_SIZE) { 
     34            // We have a matching Cdorked memory segment 
     35            infected++; 
     36            printf("A shared memory matching Cdorked signature was found.\n"); 
     37            printf("You should check your HTTP server's executable file integrity.\n"); 
     38             
     39            cdorked_data = shmat(shmid, NULL, 0666); 
     40            if(cdorked_data != NULL) { 
     41                outfile = fopen(CDORKED_OUTFILE, "wb"); 
     42                if(outfile == NULL) { 
     43                    printf("Could not open file %s for writing.", CDORKED_OUTFILE); 
     44                } 
     45                else { 
     46                    fwrite(cdorked_data, CDORKED_SHM_SIZE, 1, outfile); 
     47                    fclose(outfile); 
     48                     
     49                    printf("The Cdorked configuration was dumped in the %s file.\n\n", CDORKED_OUTFILE); 
     50                } 
     51            } 
     52        } 
     53    } 
     54    if(infected == 0) { 
     55        printf("No shared memory matching Cdorked signature was found.\n"); 
     56        printf("To further verify your server, run \"ipcs -m -p\" and look"); 
     57        printf(" for a memory segments created by your http server.\n"); 
     58    } 
     59    else { 
     60        printf("If you would like to help us in our research on Cdorked, "); 
     61        printf("please send the httpd_cdorked_config.bin and your httpd executable file "); 
     62        printf("to our lab for analysis at leveille@eset.com. Thanks!\n"); 
     63    } 
     64    return infected; 
     65} 
  • aegir/makefiles/build-panopoly.make

    diff --git a/aegir/makefiles/build-panopoly.make b/aegir/makefiles/build-panopoly.make
    index e62aa15..2230dc8 100644
    a b projects[drupal][download][url] = "http://files.aegir.cc/dev/drupal-7.22.1.tar.g 
    1010projects[panopoly][type] = profile 
    1111projects[panopoly][download][type] = git 
    1212projects[panopoly][download][branch] = 7.x-1.x 
     13projects[panopoly][download][tag] = 7.x-1.0-rc4 
  • aegir/scripts/AegirSetupA.sh.txt

    diff --git a/aegir/scripts/AegirSetupA.sh.txt b/aegir/scripts/AegirSetupA.sh.txt
    index bae4e70..63424c9 100644
    a b else 
    138138  _L_PHP_CLI=/usr/local/bin 
    139139fi 
    140140_DRUSHCMD="$_L_PHP_CLI/php $_ROOT/tools/drush/drush.php" 
     141if [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     142  _DRUSHCMD="/usr/local/bin/php52 $_ROOT/tools/drush/drush.php" 
     143fi 
    141144# 
    142145SHELL=/bin/bash 
    143146PATH=$_L_PHP_CLI:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin 
    fi 
    228231# 
    229232# Remove dangerous stuff from the string. 
    230233sanitize_string () { 
    231   echo "$1" | sed 's/[\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
     234  echo "$1" | sed 's/[\\\/\^\?\>\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
    232235} 
    233236# 
    234237# Set or update Redis password. 
    235238update_redis_password () { 
    236239  if [ ! -e "/root/.redis.pass.txt" ] && [ -e "/etc/redis/redis.conf" ] ; then 
    237     msg "INIT A: Generate random password for Redis server" 
     240    msg "$_STATUS A: Generate random password for Redis server" 
    238241    touch /root/.redis.pass.txt 
    239242    chmod 0600 /root/.redis.pass.txt &> /dev/null 
    240243    _ESC_RPASS="" 
    update_redis_password () { 
    250253      _ESC_RPASS=`sanitize_string "$_ESC_RPASS"` 
    251254    fi 
    252255    echo "$_ESC_RPASS" > /root/.redis.pass.txt 
     256    sed -i "s/^requirepass.*/requirepass $_ESC_RPASS/g" /etc/redis/redis.conf &> /dev/null 
     257    chown redis:redis /etc/redis/redis.conf 
     258    chmod 0600 /etc/redis/redis.conf 
     259    service redis-server stop &> /dev/null 
     260    killall -9 redis-server &> /dev/null 
     261    service redis-server start &> /dev/null 
    253262  fi 
    254263  if [ -e "/root/.redis.pass.txt" ] && [ -e "/etc/redis/redis.conf" ] ; then 
    255264    if [ -z "$_ESC_RPASS" ] ; then 
    update_redis_password () { 
    258267    else 
    259268      RPASS="$_ESC_RPASS" 
    260269    fi 
    261     sed -i "s/^requirepass.*/requirepass $RPASS/g" /etc/redis/redis.conf &> /dev/null 
    262     sed -i "s/isfoobared/$RPASS/g" /data/conf/global.inc                 &> /dev/null 
    263     sed -i "s/isfoobared/$RPASS/g" /var/aegir/config/includes/global.inc &> /dev/null 
     270    _REDIS_PWD_TEST=`grep "'$RPASS'" /data/conf/global.inc 2>&1` 
     271    if [[ "$_REDIS_PWD_TEST" =~ "'$RPASS'" ]] ; then 
     272      true 
     273    else 
     274      if [ ! -z "$RPASS" ] ; then 
     275        mkdir -p /data/conf 
     276        if [ -e "/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf" ] ; then 
     277          cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /data/conf/global.inc 
     278        else 
     279          cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.aegir.txt /data/conf/global.inc 
     280        fi 
     281        sed -i "s/isfoobared/$RPASS/g" /data/conf/global.inc &> /dev/null 
     282      fi 
     283    fi 
     284    if [ -e "/var/aegir/config/includes" ] && [ ! -L "/var/aegir/config/includes/global.inc" ] && [ -e "/data/conf/global.inc" ] ; then 
     285      rm -f /var/aegir/config/includes/global.inc 
     286      ln -s /data/conf/global.inc /var/aegir/config/includes/global.inc 
     287    fi 
    264288  fi 
    265289} 
    266290# 
    create_shared_dirs () { 
    302326# 
    303327feature_server_fix_002 () { 
    304328if [ ! -e "/var/log/feature-server-fixed-002.log" ] ; then 
    305 msg "UPGRADE A: Adding missing strongarm module to old fserver platforms" 
     329msg "$_STATUS A: Adding missing strongarm module to old fserver platforms" 
    306330REVISIONS="001 002 003 004 005 006 007 008 009 010 011 012 013 014" 
    307331for i in $REVISIONS; do 
    308332  if [ -d "/data/all/$i/fserver" ] ; then 
    for i in $REVISIONS; do 
    316340      if [ -e "$_ROOT/.drush/hostmaster.alias.drushrc.php" ] ; then 
    317341        _THIS_HOSTMASTER=`cat $_ROOT/.drush/hostmaster.alias.drushrc.php | grep 'site_path' | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,']//g"` 
    318342        cd _THIS_HOSTMASTER &> /dev/null 
    319         su -s /bin/bash - $_USER -c "$_DRUSHCMD --root=/data/disk/$_USER/distro/$i/fserver provision-save @platform_FeatureServerPF$i &> /dev/null" 
     343        su -s /bin/bash - $_USER -c "$_DRUSHCMD --root=$_ROOT/distro/$i/fserver provision-save @platform_FeatureServerPF$i &> /dev/null" 
    320344      fi 
    321       msg "UPGRADE A: Missing strongarm added to /data/all/$i/fserver" 
     345      msg "$_STATUS A: Missing strongarm added to /data/all/$i/fserver" 
    322346    fi 
    323347  fi 
    324348done 
    fi 
    330354# update o_contrib 
    331355# 
    332356o_contrib_update_global () { 
    333 REVISIONS="001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027" 
    334 RMMODULES="drupal-nginx-fast-x-accel-redirect varnish bakery session443 cookie_cache_bypass_adv module_supports backup_migrate purge expire imageinfo_cache httprl boost" 
     357REVISIONS="001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033" 
     358RMMODULES="drupal-nginx-fast-x-accel-redirect varnish bakery session443 cookie_cache_bypass_adv module_supports backup_migrate purge expire imageinfo_cache httprl boost phpass" 
    335359for i in $REVISIONS; do 
    336   if [ -d "/data/all/$i/o_contrib" ] && [ ! -e "/data/all/$i/o_contrib/update-018.info" ] ; then 
     360  if [ -d "/data/all/$i/o_contrib" ] && [ ! -e "/data/all/$i/o_contrib/update-019.info" ] ; then 
    337361    for m in $RMMODULES; do 
    338362      if [ -d "/data/all/$i/o_contrib/$m" ] ; then 
    339363        rm -f -r /data/all/$i/o_contrib/$m 
    340         msg "UPGRADE A: Removed /data/all/$i/o_contrib/$m" 
     364        msg "$_STATUS A: Replaced /data/all/$i/o_contrib/$m with latest release" 
    341365      fi 
    342366    done 
    343367    cd /data/all/$i/o_contrib 
    344368    git clone --branch 6.x-1.x git://github.com/omega8cc/boost.git /data/all/$i/o_contrib/boost &> /dev/null 
    345369    rm -f -r /data/all/$i/o_contrib/boost/.git 
    346370    wget -q -U iCab http://ftp.drupal.org/files/projects/backup_migrate-6.x-2.6.tar.gz 
     371    wget -q -U iCab http://ftp.drupal.org/files/projects/httprl-6.x-1.11.tar.gz 
     372    wget -q -U iCab http://ftp.drupal.org/files/projects/phpass-6.x-2.0.tar.gz 
    347373    if [ "$_PURGE_MODE" = "ON" ] ; then 
    348374      wget -q -U iCab http://ftp.drupal.org/files/projects/purge-6.x-1.6.tar.gz 
    349375      ### git clone --branch 6.x-1.x-revert git://github.com/omega8cc/purge.git /data/all/$i/o_contrib/purge &> /dev/null 
    for i in $REVISIONS; do 
    367393    if [ -e "/data/all/000/modules/redis" ] && [ ! -L "/data/all/$i/o_contrib/redis" ] ; then 
    368394      ln -s /data/all/000/modules/redis /data/all/$i/o_contrib/redis 
    369395    fi 
    370     touch /data/all/$i/o_contrib/update-018.info 
    371     msg "UPGRADE A: New modules in /data/all/$i/o_contrib: purge expire backup_migrate" 
     396    touch /data/all/$i/o_contrib/update-019.info 
    372397  fi 
    373398  if [ -d "/data/all/$i" ] ; then 
    374399    for p in `find /data/all/$i/ -maxdepth 1 -mindepth 1 -type d | sort`; do 
    cd 
    384409# update o_contrib_seven 
    385410# 
    386411o_contrib_seven_update_global () { 
    387 REVISIONS="001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027" 
    388 RMMODULES="session443 cookie_cache_bypass_adv purge expire agrcache httprl filefield_nginx_progress boost" 
     412REVISIONS="001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033" 
     413RMMODULES="session443 cookie_cache_bypass_adv purge expire agrcache httprl filefield_nginx_progress boost speedy entitycache taxonomy_edge backup_migrate" 
    389414for i in $REVISIONS; do 
    390   if [ -d "/data/all/$i/o_contrib_seven" ] && [ ! -e "/data/all/$i/o_contrib_seven/update-018.info" ] ; then 
     415  if [ -d "/data/all/$i/o_contrib_seven" ] && [ ! -e "/data/all/$i/o_contrib_seven/update-019.info" ] ; then 
    391416    for m in $RMMODULES; do 
    392417      if [ -d "/data/all/$i/o_contrib_seven/$m" ] ; then 
    393418        rm -f -r /data/all/$i/o_contrib_seven/$m 
    394         msg "UPGRADE A: Removed /data/all/$i/o_contrib_seven/$m" 
     419        msg "$_STATUS A: Replaced /data/all/$i/o_contrib_seven/$m with latest release" 
    395420      fi 
    396421    done 
    397422    if [ "$_PURGE_MODE" = "ON" ] && [ "$_PURGE_FOR_SEVEN" = "YES" ] ; then 
    for i in $REVISIONS; do 
    406431    cd /data/all/$i/o_contrib_seven 
    407432    git clone --branch 7.x-1.x git://github.com/omega8cc/boost.git /data/all/$i/o_contrib_seven/boost &> /dev/null 
    408433    rm -f -r /data/all/$i/o_contrib_seven/boost/.git 
     434    wget -q -U iCab http://ftp.drupal.org/files/projects/backup_migrate-7.x-2.5.tar.gz 
     435    wget -q -U iCab http://ftp.drupal.org/files/projects/entitycache-7.x-1.x-dev.tar.gz 
    409436    wget -q -U iCab http://ftp.drupal.org/files/projects/filefield_nginx_progress-7.x-2.3.tar.gz 
     437    wget -q -U iCab http://ftp.drupal.org/files/projects/httprl-7.x-1.11.tar.gz 
     438    wget -q -U iCab http://ftp.drupal.org/files/projects/speedy-7.x-1.7.tar.gz 
     439    wget -q -U iCab http://ftp.drupal.org/files/projects/taxonomy_edge-7.x-1.8.tar.gz 
    410440    for archive in ./*.tar.gz; do 
    411441      tar -xzf "$archive" &> /dev/null 
    412442    done 
    for i in $REVISIONS; do 
    417447    if [ -e "/data/all/000/modules/redis" ] && [ ! -L "/data/all/$i/o_contrib_seven/redis" ] ; then 
    418448      ln -s /data/all/000/modules/redis /data/all/$i/o_contrib_seven/redis 
    419449    fi 
    420     touch /data/all/$i/o_contrib_seven/update-018.info 
    421     msg "UPGRADE A: New modules in /data/all/$i/o_contrib_seven: filefield_nginx_progress purge expire" 
     450    touch /data/all/$i/o_contrib_seven/update-019.info 
    422451  fi 
    423452done 
    424453cd 
    sub_force_advanced_nginx_config () { 
    433462      else 
    434463        sed -i "s/127.0.0.1:9000/127.0.0.1:9090/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null 
    435464      fi 
     465    else 
     466      if [ "$_USE_STOCK" = "NO" ] ; then 
     467        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_octopus_include.conf  &> /dev/null 
     468      else 
     469        sed -i "s/127.0.0.1:9090/127.0.0.1:9000/g" $_THIS_NGX_PATH/nginx_advanced_include.conf &> /dev/null 
     470      fi 
    436471    fi 
    437472  fi 
    438473} 
    sub_force_advanced_nginx_config () { 
    440475# Force advanced Nginx configuration. 
    441476force_advanced_nginx_config () { 
    442477  validate_local_ip &> /dev/null 
    443   _THIS_NGX_PATH=/data/disk/$_USER/.drush/provision/http/Provision/Service/http 
     478  _THIS_NGX_PATH=$_ROOT/.drush/provision/http/Provision/Service/http 
    444479  sub_force_advanced_nginx_config 
    445   _THIS_NGX_PATH=/data/disk/$_USER/config/includes 
     480  _THIS_NGX_PATH=$_ROOT/config/includes 
    446481  sub_force_advanced_nginx_config 
    447   if [ -e "/data/disk/$_USER/config/includes" ] && [ "$_USE_STOCK" = "NO" ] ; then 
    448     if [ ! -L "/data/disk/$_USER/config/includes/nginx_advanced_include.conf" ] ; then 
    449       rm -f /data/disk/$_USER/config/includes/nginx_advanced_include.conf 
    450       ln -s /data/disk/$_USER/config/includes/nginx_octopus_include.conf /data/disk/$_USER/config/includes/nginx_advanced_include.conf 
     482  if [ -e "$_ROOT/config/includes" ] && [ "$_USE_STOCK" = "NO" ] ; then 
     483    if [ ! -L "$_ROOT/config/includes/nginx_advanced_include.conf" ] ; then 
     484      rm -f $_ROOT/config/includes/nginx_advanced_include.conf 
     485      ln -s $_ROOT/config/includes/nginx_octopus_include.conf $_ROOT/config/includes/nginx_advanced_include.conf 
    451486    fi 
    452     if [ ! -L "/data/disk/$_USER/config/includes/nginx_simple_include.conf" ] ; then 
    453       rm -f /data/disk/$_USER/config/includes/nginx_simple_include.conf 
    454       ln -s /data/disk/$_USER/config/includes/nginx_legacy_include.conf /data/disk/$_USER/config/includes/nginx_simple_include.conf 
     487    if [ ! -L "$_ROOT/config/includes/nginx_simple_include.conf" ] ; then 
     488      rm -f $_ROOT/config/includes/nginx_simple_include.conf 
     489      ln -s $_ROOT/config/includes/nginx_legacy_include.conf $_ROOT/config/includes/nginx_simple_include.conf 
    455490    fi 
    456491  fi 
    457492} 
    download_textile () { 
    467502# 
    468503# download_o_contrib_seven 
    469504download_o_contrib_seven () { 
    470   touch update-018.info 
     505  touch update-019.info 
    471506  #msg "$_STATUS A: Downloading o_contrib_seven modules, please wait..." 
    472507  wget -q -U iCab http://ftp.drupal.org/files/projects/admin-7.x-2.0-beta3.tar.gz 
    473   wget -q -U iCab http://ftp.drupal.org/files/projects/backup_migrate-7.x-2.4.tar.gz 
     508  wget -q -U iCab http://ftp.drupal.org/files/projects/backup_migrate-7.x-2.5.tar.gz 
    474509  wget -q -U iCab http://ftp.drupal.org/files/projects/blockcache_alter-7.x-1.x-dev.tar.gz 
    475510  wget -q -U iCab http://ftp.drupal.org/files/projects/cdn-7.x-2.6.tar.gz 
    476511  wget -q -U iCab http://ftp.drupal.org/files/projects/config_perms-7.x-2.x-dev.tar.gz 
    477   wget -q -U iCab http://ftp.drupal.org/files/projects/core_library-7.x-1.0-beta12.tar.gz 
    478   wget -q -U iCab http://ftp.drupal.org/files/projects/css_emimage-7.x-1.2.tar.gz 
     512  wget -q -U iCab http://ftp.drupal.org/files/projects/core_library-7.x-2.0-beta3.tar.gz 
     513  wget -q -U iCab http://ftp.drupal.org/files/projects/css_emimage-7.x-1.3.tar.gz 
    479514  wget -q -U iCab http://ftp.drupal.org/files/projects/entitycache-7.x-1.x-dev.tar.gz 
    480515  wget -q -U iCab http://ftp.drupal.org/files/projects/esi-7.x-3.0-alpha1.tar.gz 
    481516  wget -q -U iCab http://ftp.drupal.org/files/projects/filefield_nginx_progress-7.x-2.3.tar.gz 
    482517  wget -q -U iCab http://ftp.drupal.org/files/projects/flood_control-7.x-1.x-dev.tar.gz 
    483518  wget -q -U iCab http://ftp.drupal.org/files/projects/fpa-7.x-2.2.tar.gz 
     519  wget -q -U iCab http://ftp.drupal.org/files/projects/httprl-7.x-1.11.tar.gz 
    484520  wget -q -U iCab http://ftp.drupal.org/files/projects/login_security-7.x-1.2.tar.gz 
    485521  wget -q -U iCab http://ftp.drupal.org/files/projects/nocurrent_pass-7.x-1.0.tar.gz 
    486522  wget -q -U iCab http://ftp.drupal.org/files/projects/readonlymode-7.x-1.1.tar.gz 
    487523  wget -q -U iCab http://ftp.drupal.org/files/projects/reroute_email-7.x-1.1.tar.gz 
    488524  wget -q -U iCab http://ftp.drupal.org/files/projects/robotstxt-7.x-1.1.tar.gz 
    489525  wget -q -U iCab http://ftp.drupal.org/files/projects/site_verify-7.x-1.0.tar.gz 
    490   wget -q -U iCab http://ftp.drupal.org/files/projects/speedy-7.x-1.6.tar.gz 
     526  wget -q -U iCab http://ftp.drupal.org/files/projects/speedy-7.x-1.7.tar.gz 
    491527  wget -q -U iCab http://ftp.drupal.org/files/projects/taxonomy_edge-7.x-1.8.tar.gz 
    492528  wget -q -U iCab http://ftp.drupal.org/files/projects/textile-7.x-2.0-rc11.tar.gz 
    493529  wget -q -U iCab http://ftp.drupal.org/files/projects/variable_clean-7.x-1.x-dev.tar.gz 
    download_o_contrib_seven () { 
    517553    ln -s /data/all/000/modules/redis redis 
    518554  fi 
    519555  download_textile 
    520   if [ ! -e "/data/all/000/modules/redis/update-018.info" ] ; then 
     556  if [ ! -e "/data/all/000/modules/redis/update-019.info" ] ; then 
    521557    mkdir -p /data/all/000/modules 
    522558    cd /data/all/000/modules 
    523559    rm -f -r /data/all/000/modules/redis 
    524560    git clone --branch 7.x-2.x-o8 git://github.com/omega8cc/redis.git &> /dev/null 
    525561    rm -f -r redis/.git 
    526562    rm -f redis/redis.info 
    527     echo update > redis/update-018.info 
     563    echo update > redis/update-019.info 
    528564  fi 
    529565} 
    530566# 
    531567# download_o_contrib_six 
    532568download_o_contrib_six () { 
    533   touch update-018.info 
     569  touch update-019.info 
    534570  #msg "$_STATUS A: Downloading o_contrib modules, please wait..." 
    535571  wget -q -U iCab http://files.aegir.cc/dev/css_emimage-6.x-2.x-dev.tar.gz 
    536572  wget -q -U iCab http://ftp.drupal.org/files/projects/admin-6.x-2.0.tar.gz 
    download_o_contrib_six () { 
    542578  wget -q -U iCab http://ftp.drupal.org/files/projects/esi-6.x-2.x-dev.tar.gz 
    543579  wget -q -U iCab http://ftp.drupal.org/files/projects/filefield_nginx_progress-6.x-1.x-dev.tar.gz 
    544580  wget -q -U iCab http://ftp.drupal.org/files/projects/fpa-6.x-2.4.tar.gz 
     581  wget -q -U iCab http://ftp.drupal.org/files/projects/httprl-6.x-1.11.tar.gz 
    545582  wget -q -U iCab http://ftp.drupal.org/files/projects/image-6.x-1.2.tar.gz 
    546583  wget -q -U iCab http://ftp.drupal.org/files/projects/login_security-6.x-1.2.tar.gz 
     584  wget -q -U iCab http://ftp.drupal.org/files/projects/phpass-6.x-2.0.tar.gz 
    547585  wget -q -U iCab http://ftp.drupal.org/files/projects/private_upload-6.x-1.x-dev.tar.gz 
    548586  wget -q -U iCab http://ftp.drupal.org/files/projects/readonlymode-6.x-1.2.tar.gz 
    549587  wget -q -U iCab http://ftp.drupal.org/files/projects/reroute_email-6.x-1.2.tar.gz 
    download_o_contrib_six () { 
    582620    ln -s /data/all/000/modules/cache_backport cache_backport 
    583621  fi 
    584622  download_textile 
    585   if [ ! -e "/data/all/000/modules/cache_backport/update-018.info" ] ; then 
     623  if [ ! -e "/data/all/000/modules/cache_backport/update-019.info" ] ; then 
    586624    mkdir -p /data/all/000/modules 
    587625    cd /data/all/000/modules 
    588626    rm -f -r /data/all/000/modules/cache_backport 
    download_o_contrib_six () { 
    592630    done 
    593631    rm -f *.tar.gz 
    594632    sed -i "s/Cache Backand/D7 Cache Backport for D6/g" cache_backport/cache_backport.info &> /dev/null 
    595     echo update > cache_backport/update-018.info 
     633    echo update > cache_backport/update-019.info 
    596634  fi 
    597   if [ ! -e "/data/all/000/modules/redis/update-018.info" ] ; then 
     635  if [ ! -e "/data/all/000/modules/redis/update-019.info" ] ; then 
    598636    mkdir -p /data/all/000/modules 
    599637    cd /data/all/000/modules 
    600638    rm -f -r /data/all/000/modules/redis 
    601639    git clone --branch 7.x-2.x-o8 git://github.com/omega8cc/redis.git &> /dev/null 
    602640    rm -f -r redis/.git 
    603641    rm -f redis/redis.info 
    604     echo update > redis/update-018.info 
     642    echo update > redis/update-019.info 
    605643  fi 
    606644} 
    607645# 
    fi 
    636674if [ ! -e "$_THIS_CTRL" ] ; then 
    637675  _O_CONTRIB_UP=YES 
    638676fi 
    639 if [ ! -e "/data/all/000/modules/redis/update-018.info" ] ; then 
     677if [ ! -e "/data/all/000/modules/redis/update-019.info" ] ; then 
    640678  _O_CONTRIB_UP=YES 
    641679fi 
    642680if [ "$_PURGE_MODE" = "ON" ] ; then 
    manage_o_contrib () { 
    736774} 
    737775 
    738776 
    739 msg "$_STATUS A: Aegir automated install script part A" 
     777###---### Checking status 
     778# 
     779if [ -d "$_ROOT" ] ; then 
     780  _STATUS=UPGRADE 
     781  cd $_ROOT 
     782  rm -f $_ROOT/AegirSetupC.sh.txt 
     783  rm -f $_ROOT/AegirSetupB.sh.txt 
     784fi 
     785 
     786 
     787###---### User check 
     788# 
     789if [ `whoami` = "root" ] ; then 
     790  msg "$_STATUS A: Aegir automated install script part A" 
     791else 
     792  msg "$_STATUS A: FATAL ERROR: This script should be ran as a root user" 
     793  msg "$_STATUS A: FATAL ERROR: Aborting AegirSetupA installer NOW!" 
     794  touch /opt/tmp/status-AegirSetupA-FAIL 
     795  exit 1 
     796fi 
    740797 
    741798 
    742 ###---### Checking version.. 
     799###---### Checking version 
    743800# 
    744 msg "INFO A: Checking OCTOPUS version, please wait..." 
     801msg "$_STATUS A: Checking OCTOPUS version, please wait..." 
    745802if [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    746   _FILE_VERSION=release.txt 
     803  _FILE_VERSION=octopus-release.txt 
    747804else 
    748   _FILE_VERSION=version.txt 
     805  _FILE_VERSION=octopus-version.txt 
    749806fi 
    750807if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/$_FILE_VERSION" ] ; then 
    751808  _VERSIONS_TEST=`cat /opt/tmp/$_BOA_REPO_NAME/aegir/conf/$_FILE_VERSION` 
    752809  if [[ "$_VERSIONS_TEST" =~ "-dev" ]] ; then 
    753810    if [[ "$_VERSIONS_TEST" =~ "$_INSTALLER_VERSION" ]] && [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    754811      _VERSIONS_TEST_RESULT=OK 
    755       msg "INFO A: Version test result: OK" 
     812      msg "$_STATUS A: Version test result: OK" 
    756813    else 
    757814      _VERSIONS_TEST_RESULT=FAIL 
    758815    fi 
    759816  else 
    760817    if [[ "$_VERSIONS_TEST" =~ "$_INSTALLER_VERSION" ]] && [[ "$_AEGIR_VERSION" =~ "BOA" ]] ; then 
    761818      _VERSIONS_TEST_RESULT=OK 
    762       msg "INFO: Version test result: OK" 
     819      msg "$_STATUS A: Version test result: OK" 
    763820    else 
    764821      _VERSIONS_TEST_RESULT=FAIL 
    765822    fi 
    if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/$_FILE_VERSION" ] ; then 
    777834fi 
    778835 
    779836 
    780 ###---### Checking status.. 
    781 # 
    782 if [ -d "$_ROOT" ] ; then 
    783   _STATUS=UPGRADE 
    784   cd $_ROOT 
    785   msg "$_STATUS A: $_STATUS" 
    786   mrun "sleep 1" 
    787   rm -f $_ROOT/AegirSetupC.sh.txt 
    788   rm -f $_ROOT/AegirSetupB.sh.txt 
    789 else 
    790   msg "$_STATUS A: $_STATUS" 
    791 fi 
    792  
    793  
    794 ###---### Hot Sauce check.. 
     837###---### Hot Sauce check 
    795838# 
    796839if [ "$_HOT_SAUCE" = "NO" ] ; then 
    797840  _CORE="/data/all/$_LAST_ALL" 
    chown $_USER:$_USRG $_ROOT/AegirSetupC.sh.txt &> /dev/null 
    845888 
    846889###---### Run standard pre-install 
    847890# 
    848 main_dbuser_reborn () { 
     891# Generate provision backend db_passwd. 
     892provision_backend_dbpass_generate () { 
    849893  touch $_ROOT/.$_USER.pass.txt 
    850894  chmod 0600 $_ROOT/.$_USER.pass.txt 
    851895  _ESC_PASS="" 
    main_dbuser_reborn () { 
    871915    msg "$_STATUS A: FATAL ERROR: Aborting AegirSetupA installer NOW!" 
    872916    touch /opt/tmp/status-AegirSetupA-FAIL 
    873917    exit 1 
    874   else 
    875     _AEGIR_HOST_IP="$_RESOLVEIP" 
    876918  fi 
    877 /usr/bin/mysql -h localhost --port=3306 -u root mysql<<EOFMYSQL 
    878 FLUSH PRIVILEGES; 
    879 GRANT ALL PRIVILEGES ON *.* TO '$_USER'@'$_DOMAIN' IDENTIFIED BY '$_ESC_PASS' WITH GRANT OPTION; 
     919mysql -uroot mysql<<EOFMYSQL 
    880920GRANT ALL PRIVILEGES ON *.* TO '$_USER'@'$_AEGIR_HOST' IDENTIFIED BY '$_ESC_PASS' WITH GRANT OPTION; 
    881 GRANT ALL PRIVILEGES ON *.* TO '$_USER'@'$_AEGIR_HOST_IP' IDENTIFIED BY '$_ESC_PASS' WITH GRANT OPTION; 
     921GRANT ALL PRIVILEGES ON *.* TO '$_USER'@'$_RESOLVEIP' IDENTIFIED BY '$_ESC_PASS' WITH GRANT OPTION; 
    882922GRANT ALL PRIVILEGES ON *.* TO '$_USER'@'localhost' IDENTIFIED BY '$_ESC_PASS' WITH GRANT OPTION; 
    883 FLUSH PRIVILEGES; 
    884923EOFMYSQL 
     924mysqladmin flush-privileges &> /dev/null 
    885925} 
    886 if [ ! -e "$_ROOT/.$_USER.pass.txt" ] ; then 
    887   main_dbuser_reborn 
    888   echo "$_USER ALL=NOPASSWD: /etc/init.d/nginx" >> /etc/sudoers 
    889 else 
    890   if [ ! -e "$_ROOT/.$_USER.pass.txt-pre-$_INSTALLER_VERSION-$_NOW" ] ; then 
    891     mv -f $_ROOT/.$_USER.pass.txt $_ROOT/.$_USER.pass.txt-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
    892     main_dbuser_reborn 
     926# 
     927# Sync provision backend db_passwd. 
     928provision_backend_dbpass_sync () { 
     929  msg "$_STATUS A: Syncing provision backend db_passwd, please wait..." 
     930  mrun "sleep 1" 
     931  _L_SYS="$_ROOT/.$_USER.pass.txt" 
     932  mv -f $_L_SYS $_L_SYS-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
     933  provision_backend_dbpass_generate 
     934  if [ ! -z "$_ESC_PASS" ] && [ ! -z "$_ENC_PASS" ] ; then 
    893935    su -s /bin/bash - $_USER -c "$_DRUSHCMD @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_PASS' WHERE db_user='$_USER'\" &> /dev/null" 
    894     mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    895936    mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_PASS') WHERE User='$_USER';" &> /dev/null 
    896     mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    897     sed -i "s/mysql:\/\/$_USER:.*/mysql:\/\/$_USER:$_ENC_PASS@localhost',/g" /data/disk/$_USER/.drush/server_localhost.alias.drushrc.php &> /dev/null 
    898     sed -i "s/mysql:\/\/$_USER:.*/mysql:\/\/$_USER:$_ENC_PASS@localhost',/g" /data/disk/$_USER/.drush/server_master.alias.drushrc.php &> /dev/null 
    899     if [ "$_USE_STOCK" = "YES" ] || [ "$_DRUSH_CC_REQ" = "YES" ] ; then 
    900       $_DRUSHCMD cache-clear drush &> /dev/null 
    901     fi 
    902     if [ -e "$_ROOT/.drush/server_localhost.alias.drushrc.php" ] ; then 
    903       su -s /bin/bash $_USER -c "$_DRUSHCMD @hostmaster hosting-task @server_localhost verify --force &> /dev/null" 
    904     else 
    905       su -s /bin/bash $_USER -c "$_DRUSHCMD @hostmaster hosting-task @server_master verify --force &> /dev/null" 
    906     fi 
    907     msg "$_STATUS A: Running hosting-dispatch (1/3), please wait..." 
    908     $_DRUSHCMD '@hostmaster' hosting-dispatch &> /dev/null 
    909     mrun "sleep 5" 
    910     msg "$_STATUS A: Running hosting-dispatch (2/3), please wait..." 
    911     $_DRUSHCMD '@hostmaster' hosting-dispatch &> /dev/null 
    912     mrun "sleep 5" 
    913     msg "$_STATUS A: Running hosting-dispatch (3/3), please wait..." 
    914     $_DRUSHCMD '@hostmaster' hosting-dispatch &> /dev/null 
     937    sed -i "s/mysql:\/\/$_USER:.*/mysql:\/\/$_USER:$_ENC_PASS@localhost',/g" $_ROOT/.drush/server_localhost.alias.drushrc.php &> /dev/null 
     938    sed -i "s/mysql:\/\/$_USER:.*/mysql:\/\/$_USER:$_ENC_PASS@localhost',/g" $_ROOT/.drush/server_master.alias.drushrc.php &> /dev/null 
    915939  fi 
     940  mysqladmin flush-privileges &> /dev/null 
     941  if [ "$_USE_STOCK" = "YES" ] || [ "$_DRUSH_CC_REQ" = "YES" ] ; then 
     942    su -s /bin/bash $_USER -c "$_DRUSHCMD cache-clear drush &> /dev/null" 
     943  fi 
     944  if [ -e "$_ROOT/.drush/server_localhost.alias.drushrc.php" ] ; then 
     945    su -s /bin/bash $_USER -c "$_DRUSHCMD @hostmaster hosting-task @server_localhost verify --force &> /dev/null" 
     946  else 
     947    su -s /bin/bash $_USER -c "$_DRUSHCMD @hostmaster hosting-task @server_master verify --force &> /dev/null" 
     948  fi 
     949  msg "$_STATUS A: Running hosting-dispatch (1/3), please wait..." 
     950  su -s /bin/bash $_USER -c "$_DRUSHCMD '@hostmaster' hosting-dispatch &> /dev/null" 
     951  mrun "sleep 5" 
     952  msg "$_STATUS A: Running hosting-dispatch (2/3), please wait..." 
     953  su -s /bin/bash $_USER -c "$_DRUSHCMD '@hostmaster' hosting-dispatch &> /dev/null" 
     954  mrun "sleep 5" 
     955  msg "$_STATUS A: Running hosting-dispatch (3/3), please wait..." 
     956  su -s /bin/bash $_USER -c "$_DRUSHCMD '@hostmaster' hosting-dispatch &> /dev/null" 
     957} 
     958# 
     959# Sync hostmaster frontend db_passwd. 
     960hostmaster_frontend_dbpass_sync () { 
     961  msg "$_STATUS A: Syncing hostmaster frontend db_passwd, please wait..." 
     962  mrun "sleep 1" 
     963  _THIS_HM_SPTH=`cat $_ROOT/.drush/hostmaster.alias.drushrc.php | grep "site_path'" | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,']//g"` 
     964  _THIS_HM_DBUR=`cat $_THIS_HM_SPTH/drushrc.php | grep "options\['db_user'\] = " | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,';]//g"` 
     965  _THIS_HM_DBPD=`cat $_THIS_HM_SPTH/drushrc.php | grep "options\['db_passwd'\] = " | cut -d: -f2 | awk '{ print $3}' | sed "s/[\,';]//g"` 
     966  if [ -e "$_THIS_HM_SPTH" ] && [ ! -z "$_THIS_HM_DBUR" ] && [ ! -z "$_THIS_HM_DBPD" ] ; then 
     967    mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_THIS_HM_DBPD') WHERE User='$_THIS_HM_DBUR';" &> /dev/null 
     968  fi 
     969  mysqladmin flush-privileges &> /dev/null 
     970} 
     971if [ "$_STATUS" = "INIT" ] ; then 
     972  mysqladmin flush-hosts &> /dev/null 
     973  provision_backend_dbpass_generate 
     974  echo "$_USER ALL=NOPASSWD: /etc/init.d/nginx" >> /etc/sudoers 
     975else 
     976  mysqladmin flush-hosts &> /dev/null 
     977  provision_backend_dbpass_sync 
    916978fi 
    917 mrun "sleep 1" 
    918 /usr/bin/mysqladmin -u root -h localhost --port=3306 reload 
    919979cd $_ROOT 
    920 mrun "sleep 1" 
    921980 
    922981 
    923982###---### Install or upgrade Aegir Satellite Instance [Y/n] 
    else 
    9511010      msg "$_STATUS A: Aegir Satellite Instance upgrade skipped - platforms only" 
    9521011      mrun "sleep 1" 
    9531012    else 
     1013      hostmaster_frontend_dbpass_sync 
    9541014      msg "$_STATUS A: Switching user and running AegirSetupB, please wait..." 
    9551015      mrun "sleep 1" 
    9561016      rm -f /opt/tmp/testecho* 
    else 
    9791039        chmod 700 $_ROOT/backups/system 
    9801040        mv -f $_ROOT/backups/*host8* $_ROOT/backups/system/old_hostmaster/ &> /dev/null 
    9811041        chmod 600 $_ROOT/backups/system/old_hostmaster/* &> /dev/null 
     1042        hostmaster_frontend_dbpass_sync 
    9821043      fi 
    9831044      chmod 0700 /data/u &> /dev/null 
    9841045      chown root:root /data/u &> /dev/null 
    if [ "$_LOCAL_STATUS" = "INIT" ] ; then 
    10241085  rm -f -r $_AEGIR_ROOT/scripts 
    10251086  rm -f $_AEGIR_ROOT/themes/README.txt 
    10261087  rm -f $_AEGIR_ROOT/*.txt 
    1027   service nginx reload &> /dev/null 
     1088  st_runner "service nginx reload" &> /dev/null 
    10281089  cd $_AEGIR_ROOT 
    10291090  cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/robots.txt ./ 
    10301091  cd $_ROOT 
    fi 
    10341095###---### Force advanced Nginx config 
    10351096# 
    10361097force_advanced_nginx_config 
     1098st_runner "service nginx reload" &> /dev/null 
    10371099 
    10381100 
    10391101###---### Force global.inc update 
    fi 
    10501112# 
    10511113if [ -e "/var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf" ] ; then 
    10521114  if [ -e "/opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt" ] ; then 
    1053     _SSL_TEST=`cat /data/conf/global.inc 2>&1` 
    1054     if [[ "$_SSL_TEST" =~ "HTTP_X_FORWARDED_PROTO" ]] ; then 
    1055       _SSL_TEST=OK 
     1115    _SSL_TEST=`grep no-https-aegir /data/conf/global.inc 2>&1` 
     1116    if [[ "$_SSL_TEST" =~ "no-https-aegir" ]] ; then 
     1117      true 
    10561118    else 
    1057       msg "$_STATUS A: Installing forced SSL settings for this Hostmaster site, please wait..." 
     1119      msg "$_STATUS A: Installing forced SSL settings for all Satellite Hostmasters" 
    10581120      mrun "sleep 1" 
    10591121      mv -f /data/conf/global.inc /data/conf/global.inc-pre-$_INSTALLER_VERSION-$_NOW &> /dev/null 
    10601122      cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/conf/global.inc.ssl.aegir.txt /data/conf/global.inc 
    1061       service nginx reload &> /dev/null 
    10621123    fi 
    10631124  fi 
    10641125fi 
    if [ ! -z "$_REMOTE_CACHE_IP" ] ; then 
    10791140    msg "$_STATUS A: Set/rewrite remote cache IP address and disable local caches" 
    10801141    mrun "sleep 1" 
    10811142    sed -i "s/'127.0.0.1'/'$_REMOTE_CACHE_IP'/g" /data/conf/global.inc &> /dev/null 
    1082     sed -i "s/'127.0.0.1'/'$_REMOTE_CACHE_IP'/g" /var/aegir/config/includes/global.inc &> /dev/null 
    10831143    service redis-server stop &> /dev/null 
    10841144    update-rc.d -f redis-server remove &> /dev/null 
    10851145    service redis stop &> /dev/null 
    if [ "$_LOCAL_STATUS" = "INIT" ] ; then 
    12501310    fi 
    12511311    echo "$_ESC_LUPASS" > $_ROOT/log/pass.txt 
    12521312    # get the password hash 
    1253     ph=$(makepasswd --clearfrom=$_ROOT/log/pass.txt --crypt-md5 --verbose | grep "=" | cut -d= -f3 | awk '{ print $1}') 
     1313    ph=$(mkpasswd -m sha-512 $_ESC_LUPASS $(openssl rand -base64 16 | tr -d '+=' | head -c 16)) 
    12541314    # Set the password 
    12551315    usermod -p $ph $_USERFTP &> /dev/null 
    12561316    passwd -w 7 -x 90 $_USERFTP &> /dev/null 
    if [ "$_LOCAL_STATUS" = "INIT" ] ; then 
    12591319  chsh -s $_PATH_LSHELL $_USERFTP &> /dev/null 
    12601320  echo >> /etc/lshell.conf 
    12611321  echo "[$_USERFTP]" >> /etc/lshell.conf 
    1262   echo "path : ['/data/disk/$_USER/distro', '/data/disk/$_USER/static', '/data/disk/$_USER/backups', '/data/disk/$_USER/clients']" >> /etc/lshell.conf 
     1322  echo "path : ['$_ROOT/distro', '$_ROOT/static', '$_ROOT/backups', '$_ROOT/clients']" >> /etc/lshell.conf 
    12631323fi 
    12641324 
    12651325 
    _USER_HD="/home/$_USERFTP" 
    12701330if [ ! -L "$_USER_HD/backups" ] ; then 
    12711331  msg "$_STATUS A: Adding symlink to the sites backups" 
    12721332  mrun "sleep 1" 
    1273   ln -s /data/disk/$_USER/backups $_USER_HD/backups 
     1333  ln -s $_ROOT/backups $_USER_HD/backups 
    12741334fi 
    12751335 
    12761336 
    _USER_HD="/home/$_USERFTP" 
    13531413if [ ! -L "$_USER_HD/clients" ] ; then 
    13541414  msg "$_STATUS A: Adding symlink to the clients directory" 
    13551415  mrun "sleep 1" 
    1356   ln -s /data/disk/$_USER/clients $_USER_HD/clients 
     1416  ln -s $_ROOT/clients $_USER_HD/clients 
    13571417fi 
    1358 rm -f -r /data/disk/$_USER/clients/admin &> /dev/null 
    1359 rm -f -r /data/disk/$_USER/clients/omega8ccgmailcom &> /dev/null 
    1360 rm -f -r /data/disk/$_USER/clients/nocomega8cc &> /dev/null 
    1361 rm -f -r /data/disk/$_USER/clients/*/backups &> /dev/null 
    1362 symlinks -dr /data/disk/$_USER/clients &> /dev/null 
     1418rm -f -r $_ROOT/clients/admin &> /dev/null 
     1419rm -f -r $_ROOT/clients/omega8ccgmailcom &> /dev/null 
     1420rm -f -r $_ROOT/clients/nocomega8cc &> /dev/null 
     1421rm -f -r $_ROOT/clients/*/backups &> /dev/null 
     1422symlinks -dr $_ROOT/clients &> /dev/null 
    13631423 
    13641424 
    13651425###---### Remove not used dot files 
    else 
    13971457      _ESC_LUPASS=`sanitize_string "$_ESC_LUPASS"` 
    13981458    fi 
    13991459    echo "$_ESC_LUPASS" > $_ROOT/log/pass.txt 
    1400     ph=$(makepasswd --clearfrom=$_ROOT/log/pass.txt --crypt-md5 --verbose | grep "=" | cut -d= -f3 | awk '{ print $1}') 
     1460    ph=$(mkpasswd -m sha-512 $_ESC_LUPASS $(openssl rand -base64 16 | tr -d '+=' | head -c 16)) 
    14011461    usermod -p $ph $_USERFTP &> /dev/null 
    14021462    _PASWD=`cat $_ROOT/log/pass.txt` 
    14031463    _PASWD=`echo -n $_PASWD | tr -d "\n"` 
    mrun "sleep 1" 
    18021862cd / 
    18031863chmod 711 bin boot data dev emul etc home lib media mnt opt sbin selinux srv sys usr var &> /dev/null 
    18041864chmod 700 root &> /dev/null 
     1865if [ ! -f "/data/all/permissions-fix-$_INSTALLER_VERSION.info" ] ; then 
     1866  st_runner "chmod 02775 /data/all/*/*/sites/all/{modules,libraries,themes}" &> /dev/null 
     1867  st_runner "chown -R root:root /data/all" &> /dev/null 
     1868  st_runner "chown -R root:users /data/all/*/*/sites" &> /dev/null 
     1869  echo fixed > /data/all/permissions-fix-$_INSTALLER_VERSION.info 
     1870fi 
    18051871chown root:root /data/all &> /dev/null 
    1806 chown -R root:root /data/src &> /dev/null 
    1807 chown -R root:root /data/conf &> /dev/null 
    18081872chown root:root $_CORE &> /dev/null 
    1809 chown -R root:root $_CORE/o_contrib &> /dev/null 
    1810 chown -R root:root $_CORE/o_contrib_seven &> /dev/null 
    1811 chown -R root:root /data/all/$_LAST_ALL/o_contrib &> /dev/null 
    1812 chown -R root:root /data/all/$_LAST_ALL/o_contrib_seven &> /dev/null 
    1813 chown -R root:root /data/all/000 &> /dev/null 
     1873st_runner "chown -R root:root /data/src" &> /dev/null 
     1874st_runner "chown -R root:root /data/conf" &> /dev/null 
     1875st_runner "chown -R root:root $_CORE/o_contrib" &> /dev/null 
     1876st_runner "chown -R root:root $_CORE/o_contrib_seven" &> /dev/null 
     1877st_runner "chown -R root:root /data/all/$_LAST_ALL/o_contrib" &> /dev/null 
     1878st_runner "chown -R root:root /data/all/$_LAST_ALL/o_contrib_seven" &> /dev/null 
     1879st_runner "chown -R root:root /data/all/000" &> /dev/null 
    18141880chown root:root /opt/tmp &> /dev/null 
    18151881chmod 0711 $_CORE /data/all /data/all/000 /data/src /data /data/disk /data/conf &> /dev/null 
    18161882chmod 0700 /data/u &> /dev/null 
  • aegir/scripts/AegirSetupB.sh.txt

    diff --git a/aegir/scripts/AegirSetupB.sh.txt b/aegir/scripts/AegirSetupB.sh.txt
    index 97d8262..a25baf0 100644
    a b else 
    124124  _L_PHP_CLI=/usr/local/bin 
    125125fi 
    126126_DRUSHCMD="$_L_PHP_CLI/php $_ROOT/tools/drush/drush.php" 
     127if [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     128  _DRUSHCMD="/usr/local/bin/php52 $_ROOT/tools/drush/drush.php" 
     129fi 
    127130# 
    128131SHELL=/bin/bash 
    129132PATH=$_L_PHP_CLI:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin 
    get_dev_ext () { 
    203206update_php_cli_drush () { 
    204207  if [ "$_PHP_CLI_VERSION" = "5.3" ] && [ -x "/opt/local/bin/php" ] ; then 
    205208    sed -i "s/^#\!\/.*/#\!\/opt\/local\/bin\/php/g"  $_ROOT/tools/drush/drush.php &> /dev/null 
    206   elif [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php" ] ; then 
     209  elif [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     210    sed -i "s/^#\!\/.*/#\!\/usr\/local\/bin\/php52/g"  $_ROOT/tools/drush/drush.php &> /dev/null 
     211  else 
    207212    sed -i "s/^#\!\/.*/#\!\/usr\/local\/bin\/php/g"  $_ROOT/tools/drush/drush.php &> /dev/null 
    208213  fi 
    209214} 
    update_php_cli_drush () { 
    211216_SRCDIR=/opt/tmp/files 
    212217_LOG=/var/backups/octopus-$_USER-$_NOW.log 
    213218# 
     219 
     220###---### Checking status 
     221# 
     222if [ -e "$_ROOT/aegir.sh" ] ; then 
     223  _STATUS=UPGRADE 
     224  cd $_ROOT 
     225fi 
     226 
     227 
     228###---### User check 
     229# 
    214230msg "$_STATUS B: Aegir automated install script part B" 
    215231if [ `whoami` = "root" ] ; then 
    216232  msg "$_STATUS B: FATAL ERROR: This script should be ran as a non-root user" 
    if [ `whoami` = "root" ] ; then 
    220236fi 
    221237 
    222238 
    223 ###---### Checking status.. 
    224 # 
    225 if [ -e "$_ROOT/aegir.sh" ] ; then 
    226   _STATUS=UPGRADE 
    227   cd $_ROOT 
    228 fi 
    229  
    230  
    231239###---### Add required users and create directories 
    232240# 
    233241msg "$_STATUS B: Creating directories with correct permissions" 
  • aegir/scripts/AegirSetupC.sh.txt

    diff --git a/aegir/scripts/AegirSetupC.sh.txt b/aegir/scripts/AegirSetupC.sh.txt
    index 5101c08..fe65f3a 100644
    a b else 
    143143fi 
    144144_DRUSHCMD="$_L_PHP_CLI/php $_ROOT/tools/drush/drush.php" 
    145145_DRUSH5CMD="$_L_PHP_CLI/php /opt/tools/drush/5/drush/drush.php" 
     146if [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     147  _DRUSHCMD="/usr/local/bin/php52 $_ROOT/tools/drush/drush.php" 
     148fi 
    146149# 
    147150SHELL=/bin/bash 
    148151PATH=$_L_PHP_CLI:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin 
    upgrade_contrib_less () { 
    483486  rm -f -r {ctools,rules,views} 
    484487  wget -q -U iCab http://ftp.drupal.org/files/projects/ctools-7.x-1.3.tar.gz 
    485488  wget -q -U iCab http://ftp.drupal.org/files/projects/rules-7.x-2.3.tar.gz 
    486   wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.6.tar.gz 
     489  wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.7.tar.gz 
    487490  for archive in ./*.tar.gz; do 
    488491    tar -xzf "$archive" &> /dev/null 
    489492  done 
    upgrade_contrib_more () { 
    508511  wget -q -U iCab http://ftp.drupal.org/files/projects/ctools-7.x-1.3.tar.gz 
    509512  wget -q -U iCab http://ftp.drupal.org/files/projects/date-7.x-2.6.tar.gz 
    510513  wget -q -U iCab http://ftp.drupal.org/files/projects/email-7.x-1.2.tar.gz 
    511   wget -q -U iCab http://ftp.drupal.org/files/projects/entity-7.x-1.x-dev.tar.gz 
     514  wget -q -U iCab http://ftp.drupal.org/files/projects/entity-7.x-1.1.tar.gz 
    512515  wget -q -U iCab http://ftp.drupal.org/files/projects/facetapi-7.x-1.2.tar.gz 
    513516  wget -q -U iCab http://ftp.drupal.org/files/projects/features-7.x-2.0-beta1.tar.gz 
    514517  wget -q -U iCab http://ftp.drupal.org/files/projects/fontyourface-7.x-2.7.tar.gz 
    upgrade_contrib_more () { 
    522525  wget -q -U iCab http://ftp.drupal.org/files/projects/taxonomy_menu-7.x-1.4.tar.gz 
    523526  wget -q -U iCab http://ftp.drupal.org/files/projects/token-7.x-1.5.tar.gz 
    524527  wget -q -U iCab http://ftp.drupal.org/files/projects/views_bulk_operations-7.x-3.1.tar.gz 
    525   wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.6.tar.gz 
     528  wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.7.tar.gz 
    526529  for archive in ./*.tar.gz; do 
    527530    tar -xzf "$archive" &> /dev/null 
    528531  done 
    upgrade_contrib_some () { 
    547550  wget -q -U iCab http://ftp.drupal.org/files/projects/navbar-7.x-1.0-alpha5.tar.gz 
    548551  wget -q -U iCab http://ftp.drupal.org/files/projects/rules-7.x-2.3.tar.gz 
    549552  wget -q -U iCab http://ftp.drupal.org/files/projects/token-7.x-1.5.tar.gz 
    550   wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.6.tar.gz 
     553  wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.7.tar.gz 
    551554  for archive in ./*.tar.gz; do 
    552555    tar -xzf "$archive" &> /dev/null 
    553556  done 
    create_civicrm_symlinks () { 
    651654} 
    652655 
    653656 
     657###---### Checking status 
     658# 
     659if [ -e "$_ROOT/log/setupmail.txt" ] ; then 
     660  _STATUS=UPGRADE 
     661  cd $_ROOT 
     662fi 
     663 
     664 
    654665###---### User check 
    655666# 
    656667msg "$_STATUS C: Aegir automated install script part C" 
    if [ `whoami` = "root" ] ; then 
    662673fi 
    663674 
    664675 
    665 ###---### Checking status.. 
    666 # 
    667 if [ -e "$_ROOT/log/setupmail.txt" ] ; then 
    668   _STATUS=UPGRADE 
    669   cd $_ROOT 
    670 fi 
    671  
    672  
    673 ###---### Hot Sauce check.. 
     676###---### Hot Sauce check 
    674677# 
    675678if [ "$_HOT_SAUCE" = "NO" ] ; then 
    676679  _CORE="/data/all/$_LAST_ALL" 
    _F_CIVICRM_M7="CiviCRM $_CIVICRM_M7 $_SMALLCORE7 P.$_THIS_CORE" 
    700703_F_CIVICRM6="CiviCRM $_CIVICRM6 $_SMALLCORE6 P.$_THIS_CORE" 
    701704_F_COD="Conference 1.0-rc2 $_SMALLCORE6 P.$_THIS_CORE" 
    702705_F_COM_MERCE="Commerce 2.6 $_SMALLCORE7 P.$_THIS_CORE" 
    703 _F_COMMERCE="Commerce 1.16 $_SMALLCORE7 P.$_THIS_CORE" 
     706_F_COMMERCE="Commerce 1.18 $_SMALLCORE7 P.$_THIS_CORE" 
    704707_F_D6COMMONS="Commons 2.12 $_SMALLCORE6 P.$_THIS_CORE" 
    705708_F_D7COMMONS="Commons 3.2 $_SMALLCORE7 P.$_THIS_CORE" 
    706709_F_DRUPAL_EDGE_8="Drupal $_DRUPAL_EDGE_8" 
    _F_OPENATRIUM="Open Atrium 1.7.1 $_SMALLCORE6 P.$_THIS_CORE" 
    720723_F_OPENCHURCH="OpenChurch 1.11-b9 $_SMALLCORE7 P.$_THIS_CORE" 
    721724_F_OPENDEALS="Open Deals $_OPEN_DEALS $_SMALLCORE7 P.$_THIS_CORE" 
    722725_F_OPENENTERPRISE="Open Enterprise 1.0-rc3 $_SMALLCORE7 P.$_THIS_CORE" 
    723 _F_OPENOUTREACH="Open Outreach 1.0-rc10 $_SMALLCORE7 P.$_THIS_CORE" 
     726_F_OPENOUTREACH="Open Outreach 1.0-rc11 $_SMALLCORE7 P.$_THIS_CORE" 
    724727_F_OPENPUBLIC="OpenPublic 1.0-b3 $_SMALLCORE7 P.$_THIS_CORE" 
    725728_F_OPENPUBLISH="OpenPublish 3.0-b7 $_SMALLCORE7 P.$_THIS_CORE" 
    726729_F_OPENSCHOLAR="OpenScholar 2.0-rc1 $_SMALLCORE6 P.$_THIS_CORE" 
    727 _F_PANOPOLY="Panopoly 1.0-rc4a $_SMALLCORE7 P.$_THIS_CORE" 
     730_F_PANOPOLY="Panopoly 1.0-rc4 $_SMALLCORE7 P.$_THIS_CORE" 
    728731_F_PROSEPOINT="Prosepoint $_PROSEPOINT $_SMALLCORE6 P.$_THIS_CORE" 
    729732_F_UBER_CART_SEVEN="Ubercart $_UBER_CART_SEVEN $_SMALLCORE7 P.$_THIS_CORE" 
    730733_F_UBERCART="Ubercart $_UBERCART $_SMALLCORE6 P.$_THIS_CORE" 
    if [ ! -d "$_CORE_DISTRO" ] ; then 
    10631066    cd $_THIS_PRPATH 
    10641067    cp -af /opt/tmp/$_BOA_REPO_NAME/aegir/patches/$_THIS_PRNAME.patch ./ 
    10651068    patch -p1 < $_THIS_PRNAME.patch &> /dev/null 
    1066     if [ $_COMMERCE = "7.x-1.16" ] ; then 
     1069    if [ $_COMMERCE = "7.x-1.18" ] ; then 
    10671070      cd $_THIS_PRPATH/modules 
    1068       upgrade_contrib_less 
     1071      rm -f -r {addressfield,entity} 
     1072      wget -q -U iCab http://ftp.drupal.org/files/projects/entity-7.x-1.1.tar.gz 
     1073      wget -q -U iCab http://ftp.drupal.org/files/projects/addressfield-7.x-1.0-beta4.tar.gz 
     1074      for archive in ./*.tar.gz; do 
     1075        tar -xzf "$archive" &> /dev/null 
     1076      done 
     1077      rm -f *.tar.gz 
    10691078    fi 
    10701079    create_dirs 
    10711080    themes_for_d7 
    if [ ! -d "$_CORE_DISTRO" ] ; then 
    22452254    fi 
    22462255    replace_drupal7_core 
    22472256    remove_default_core_seven_profiles 
    2248     if [ $_OPENDEALS = "7.x-1.19" ] ; then 
     2257    if [ $_OPENDEALS = "7.x-1.20" ] ; then 
    22492258      cd $_THIS_PRPATH/modules 
    22502259      rm -f -r {diff} 
    22512260      wget -q -U iCab http://ftp.drupal.org/files/projects/diff-7.x-3.2.tar.gz 
    build_openpublic () { 
    24052414    rm -f -r $_THIS_PRPATH/modules/{panels,password_policy,views,webform} 
    24062415    wget -q -U iCab http://ftp.drupal.org/files/projects/panels-7.x-3.2.tar.gz 
    24072416    wget -q -U iCab http://ftp.drupal.org/files/projects/password_policy-7.x-1.0-rc3.tar.gz 
    2408     wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.6.tar.gz 
     2417    wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.7.tar.gz 
    24092418    wget -q -U iCab http://ftp.drupal.org/files/projects/webform-7.x-3.17.tar.gz 
    24102419    for archive in ./*.tar.gz; do 
    24112420      tar -xzf "$archive" &> /dev/null 
    if [ ! -d "$_CORE_DISTRO" ] ; then 
    28532862    cd $_THIS_PRPATH/modules 
    28542863    wget -q -U iCab http://ftp.drupal.org/files/projects/colorbox-7.x-2.3.tar.gz 
    28552864    wget -q -U iCab http://ftp.drupal.org/files/projects/ctools-7.x-1.3.tar.gz 
    2856     wget -q -U iCab http://ftp.drupal.org/files/projects/entity-7.x-1.x-dev.tar.gz 
     2865    wget -q -U iCab http://ftp.drupal.org/files/projects/entity-7.x-1.1.tar.gz 
    28572866    wget -q -U iCab http://ftp.drupal.org/files/projects/google_analytics-7.x-1.3.tar.gz 
    28582867    wget -q -U iCab http://ftp.drupal.org/files/projects/libraries-7.x-2.x-dev.tar.gz 
    28592868    wget -q -U iCab http://ftp.drupal.org/files/projects/pathauto-7.x-1.2.tar.gz 
    28602869    wget -q -U iCab http://ftp.drupal.org/files/projects/rules-7.x-2.3.tar.gz 
    28612870    wget -q -U iCab http://ftp.drupal.org/files/projects/token-7.x-1.5.tar.gz 
    28622871    wget -q -U iCab http://ftp.drupal.org/files/projects/ubercart-7.x-3.4.tar.gz 
    2863     wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.6.tar.gz 
     2872    wget -q -U iCab http://ftp.drupal.org/files/projects/views-7.x-3.7.tar.gz 
    28642873    for archive in ./*.tar.gz; do 
    28652874      tar -xzf "$archive" &> /dev/null 
    28662875    done 
  • aegir/scripts/AegirSetupM.sh.txt

    diff --git a/aegir/scripts/AegirSetupM.sh.txt b/aegir/scripts/AegirSetupM.sh.txt
    index bf2985d..f4b96ab 100644
    a b msg() { 
    6060update_php_cli_drush () { 
    6161  if [ "$_PHP_CLI_VERSION" = "5.3" ] && [ -x "/opt/local/bin/php" ] ; then 
    6262    sed -i "s/^#\!\/.*/#\!\/opt\/local\/bin\/php/g"  /var/aegir/drush/drush.php &> /dev/null 
    63   elif [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php" ] ; then 
     63  elif [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     64    sed -i "s/^#\!\/.*/#\!\/usr\/local\/bin\/php52/g"  /var/aegir/drush/drush.php &> /dev/null 
     65  else 
    6466    sed -i "s/^#\!\/.*/#\!\/usr\/local\/bin\/php/g"  /var/aegir/drush/drush.php &> /dev/null 
    6567  fi 
    6668} 
    get_dev_ext () { 
    7678# 
    7779# Remove dangerous stuff from the string. 
    7880sanitize_string () { 
    79   echo "$1" | sed 's/[\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
     81  echo "$1" | sed 's/[\\\/\^\?\>\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
    8082} 
    8183# 
    8284######################################################################## 
  • aegir/scripts/AegirUpgrade.sh.txt

    diff --git a/aegir/scripts/AegirUpgrade.sh.txt b/aegir/scripts/AegirUpgrade.sh.txt
    index 40f7f23..0a08d1c 100644
    a b else 
    5757  _L_PHP_CLI=/usr/local/bin 
    5858fi 
    5959_DRUSHCMD="$_L_PHP_CLI/php /var/aegir/drush/drush.php" 
    60  
     60if [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     61  _DRUSHCMD="/usr/local/bin/php52 /var/aegir/drush/drush.php" 
     62fi 
    6163SHELL=/bin/bash 
    6264PATH=$_L_PHP_CLI:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin 
    6365 
    export DEBIAN_FRONTEND=noninteractive 
    7779update_php_cli_drush () { 
    7880  if [ "$_PHP_CLI_VERSION" = "5.3" ] && [ -x "/opt/local/bin/php" ] ; then 
    7981    sed -i "s/^#\!\/.*/#\!\/opt\/local\/bin\/php/g"  /var/aegir/drush/drush.php &> /dev/null 
    80   elif [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php" ] ; then 
     82  elif [ "$_PHP_CLI_VERSION" = "5.2" ] && [ -x "/usr/local/bin/php52" ] ; then 
     83    sed -i "s/^#\!\/.*/#\!\/usr\/local\/bin\/php52/g"  /var/aegir/drush/drush.php &> /dev/null 
     84  else 
    8185    sed -i "s/^#\!\/.*/#\!\/usr\/local\/bin\/php/g"  /var/aegir/drush/drush.php &> /dev/null 
    8286  fi 
    8387} 
  • aegir/tools/BOND.sh.txt

    diff --git a/aegir/tools/BOND.sh.txt b/aegir/tools/BOND.sh.txt
    index 70de940..48d0f93 100755
    a b _AEGIR_VERSION=BOA-2.0.8 
    146146### DON'T EDIT ANYTHING BELOW THIS LINE    ### 
    147147###----------------------------------------### 
    148148 
    149 _INSTALLER_VERSION=BOA-2.0.8 
     149_INSTALLER_VERSION=BOA-2.0.9 
    150150_NOW=`date +%y%m%d-%H%M` 
    151151_RAM=`free -mto | grep Mem: | awk '{ print $2 }'` 
    152152_THISHOST=`uname -n` 
    restart_services () { 
    612612# 
    613613tune_web_server_config () { 
    614614  _LIM_FPM="$_L_PHP_FPM_WORKERS" 
    615   if [ "$_LIM_FPM" -lt "6" ] ; then 
    616     _LIM_FPM=6 
     615  if [ "$_LIM_FPM" -lt "3" ] ; then 
     616    _LIM_FPM=3 
     617  fi 
     618  let "_PROCESS_MAX_FPM = (($_LIM_FPM * 2))" 
     619  let "_CHILD_MAX_FPM = (($_PROCESS_MAX_FPM - 2))" 
     620  let "_START_FPM = (($_CHILD_MAX_FPM - 4))" 
     621  if [ "$_START_FPM" -lt "2" ] ; then 
     622    _START_FPM=2 
     623  fi 
     624  let "_START_LEGACY_FPM = (($_LIM_FPM / 3))" 
     625  if [ "$_START_LEGACY_FPM" -lt "2" ] ; then 
     626    _START_LEGACY_FPM=2 
    617627  fi 
    618   let "_START_FPM = (($_LIM_FPM / 2))" 
    619628  if [ ! -z "$_START_FPM" ] ; then 
    620     let "_PROCESS_MAX_FPM = (($_LIM_FPM * 2))" 
    621     sed -i "s/max_children\">.*</max_children\">$_START_FPM</g"                /opt/etc/php-fpm.conf &> /dev/null 
    622     sed -i "s/pm.max_children =.*/pm.max_children = $_LIM_FPM/g"               /opt/local/etc/php53-fpm.conf &> /dev/null 
     629    sed -i "s/max_children\">.*</max_children\">$_START_LEGACY_FPM</g"         /opt/etc/php-fpm.conf &> /dev/null 
     630    sed -i "s/pm.max_children =.*/pm.max_children = $_CHILD_MAX_FPM/g"         /opt/local/etc/php53-fpm.conf &> /dev/null 
    623631    sed -i "s/pm.start_servers =.*/pm.start_servers = $_START_FPM/g"           /opt/local/etc/php53-fpm.conf &> /dev/null 
    624632    sed -i "s/pm.max_spare_servers =.*/pm.max_spare_servers = $_START_FPM/g"   /opt/local/etc/php53-fpm.conf &> /dev/null 
    625633    sed -i "s/process.max =.*/process.max = $_PROCESS_MAX_FPM/g"               /opt/local/etc/php53-fpm.conf &> /dev/null 
    tune_memory_limits () { 
    736744        _USE_PHP=512 
    737745        _USE_APC=256 
    738746        if [ "$_PHP_FPM_WORKERS" = "AUTO" ] ; then 
    739           _L_PHP_FPM_WORKERS=6 
     747          _L_PHP_FPM_WORKERS=3 
    740748        else 
    741749          _L_PHP_FPM_WORKERS=$_PHP_FPM_WORKERS 
    742750        fi 
    tune_memory_limits () { 
    764772    _USE_PHP="$_USE" 
    765773    _USE_APC="$_USE" 
    766774    if [ "$_PHP_FPM_WORKERS" = "AUTO" ] ; then 
    767       _L_PHP_FPM_WORKERS=6 
     775      _L_PHP_FPM_WORKERS=3 
    768776    else 
    769777      _L_PHP_FPM_WORKERS=$_PHP_FPM_WORKERS 
    770778    fi 
    tune_memory_limits () { 
    796804  sed -i "s/88/$_USE_SQL/g"  /etc/mysql/my.cnf &> /dev/null 
    797805  sed -i "s/88/$_USE_APC/g"  /etc/redis/redis.conf &> /dev/null 
    798806  if [ -e "/etc/default/jetty9" ] && [ -e "/opt/solr4" ] ; then 
    799     sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=/opt/solr4 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty9 &> /dev/null 
     807    sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=\/opt\/solr4 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty9 &> /dev/null 
    800808  fi 
    801809  if [ -e "/etc/default/jetty8" ] && [ -e "/opt/solr3" ] ; then 
    802     sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=/opt/solr3 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty8 &> /dev/null 
     810    sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=\/opt\/solr3 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty8 &> /dev/null 
    803811  fi 
    804812  if [ -e "/etc/default/jetty7" ] && [ -e "/opt/solr1" ] ; then 
    805     sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=/opt/solr1 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty7 &> /dev/null 
     813    sed -i "s/^JAVA_OPTIONS.*/JAVA_OPTIONS=\"-Xms8m $_USE_JETTY -Djava.awt.headless=true -Dsolr.solr.home=\/opt\/solr1 \$JAVA_OPTIONS\" # Options/g" /etc/default/jetty7 &> /dev/null 
    806814  fi 
    807815  if [[ "$_THISHOST" =~ ".host8." ]] ; then 
    808816    if [[ "$_THISHOST" =~ "ocean.ams.host8.biz" ]] || [[ "$_THISHOST" =~ "ocean.nyc.host8.biz" ]] ; then 
    tune_memory_limits () { 
    821829  fi 
    822830  if [ "$_CUSTOM_CONFIG_SQL" = "NO" ] ; then 
    823831    if [ "$_DB_BINARY_LOG" = "NO" ] ; then 
     832      bash /var/xdrago/purge_binlogs.sh &> /dev/null 
    824833      sed -i "s/.*purge_binlogs.*//g" /var/spool/cron/crontabs/root &> /dev/null 
    825834      sed -i "/^$/d" /var/spool/cron/crontabs/root &> /dev/null 
    826835      sed -i "s/^log_bin/#log_bin/g"                   /etc/mysql/my.cnf &> /dev/null 
    _BOA_REPO_GIT_URLX=${_BOA_REPO_GIT_URL//\//\\\/} 
    910919# 
    911920# 
    912921if [ `whoami` = "root" ] ; then 
     922  chmod a+w /dev/null 
    913923  msg "INFO: This script is ran as a root user" 
    914924else 
    915925  msg "ERROR: This script should be ran as a root user - please `sudo -i` first" 
    if [ "$_AEGIR_VERSION" = "HEAD" ] ; then 
    951961    cd /opt/tmp 
    952962  fi 
    953963else 
    954   wget -q -U iCab http://files.aegir.cc/versions/nginx-for-drupal-$_AEGIR_VERSION.tar.gz 
    955   gunzip -q -c nginx-for-drupal-$_AEGIR_VERSION.tar.gz | tar -xf - 
    956   rm -f nginx-for-drupal-$_AEGIR_VERSION.tar.gz 
     964  wget -q -U iCab http://files.aegir.cc/versions/nginx-for-drupal-$_INSTALLER_VERSION.tar.gz 
     965  gunzip -q -c nginx-for-drupal-$_INSTALLER_VERSION.tar.gz | tar -xf - 
     966  rm -f nginx-for-drupal-$_INSTALLER_VERSION.tar.gz 
    957967  _BOA_REPO_NAME="nginx-for-drupal" 
    958968fi 
    959969# 
  • aegir/tools/bin/barracuda

    diff --git a/aegir/tools/bin/barracuda b/aegir/tools/bin/barracuda
    index 63a44c8..b8f64a9 100755
    a b up_start () 
    149149    touch /var/run/boa_wait.pid 
    150150    mkdir -p $_LOG_DIR 
    151151    cd /var/backups 
    152     rm -f /var/backups/BARRACUDA.sh.* 
     152    rm -f /var/backups/BARRACUDA.sh* 
    153153  fi 
    154154} 
    155155 
    up_finish () 
    157157{ 
    158158  rm -f /var/run/boa_run.pid 
    159159  rm -f /var/run/boa_wait.pid 
    160   rm -f /var/backups/BARRACUDA.sh.* 
    161   rm -f /root/BOA.sh.* 
     160  rm -f /var/backups/BARRACUDA.sh* 
     161  rm -f /root/BOA.sh* 
     162  rm -f /root/.bashrc.bak* 
    162163  echo 
    163164  echo BARRACUDA upgrade completed 
    164165  echo Bye 
    set_pin_priority () 
    225226check_root () 
    226227{ 
    227228  if [ `whoami` = "root" ] ; then 
    228     true 
     229    chmod a+w /dev/null 
    229230    sed -i "s/.*173.231.133.190.*//g" /etc/hosts &> /dev/null 
    230231    sed -i "/^$/d" /etc/hosts &> /dev/null 
    231232  else 
  • aegir/tools/bin/boa

    diff --git a/aegir/tools/bin/boa b/aegir/tools/bin/boa
    index 9b3c307..1c87703 100755
    a b init_start () 
    9999    touch /var/run/boa_wait.pid 
    100100    mkdir -p /var/backups 
    101101    cd /var/backups 
    102     rm -f /var/backups/BARRACUDA.sh.* 
    103     rm -f /var/backups/OCTOPUS.sh.* 
     102    rm -f /var/backups/BARRACUDA.sh* 
     103    rm -f /var/backups/OCTOPUS.sh* 
    104104  fi 
    105105} 
    106106 
    init_finish () 
    108108{ 
    109109  rm -f /var/run/boa_run.pid 
    110110  rm -f /var/run/boa_wait.pid 
    111   rm -f /var/backups/BARRACUDA.sh.* 
    112   rm -f /var/backups/OCTOPUS.sh.* 
    113   rm -f /root/BOA.sh.* 
     111  rm -f /var/backups/BARRACUDA.sh* 
     112  rm -f /var/backups/OCTOPUS.sh* 
     113  rm -f /root/BOA.sh* 
    114114  echo 
    115115  echo BOA $version completed 
    116116  echo Bye 
    set_pin_priority () 
    194194check_root () 
    195195{ 
    196196  if [ `whoami` = "root" ] ; then 
    197     true 
     197    chmod a+w /dev/null 
    198198    sed -i "s/.*173.231.133.190.*//g" /etc/hosts &> /dev/null 
    199199    sed -i "/^$/d" /etc/hosts &> /dev/null 
    200200  else 
  • aegir/tools/bin/octopus

    diff --git a/aegir/tools/bin/octopus b/aegir/tools/bin/octopus
    index 4bb6419..2100a7b 100755
    a b up_start () 
    221221    touch /var/run/boa_wait.pid 
    222222    mkdir -p $_LOG_DIR 
    223223    cd /var/backups 
    224     rm -f /var/backups/OCTOPUS.sh.* 
     224    rm -f /var/backups/OCTOPUS.sh* 
    225225  fi 
    226226  if [ "$cmmode" = "log" ] ; then 
    227227    silent="$cmmode" 
    up_finish () 
    235235{ 
    236236  rm -f /var/run/boa_run.pid 
    237237  rm -f /var/run/boa_wait.pid 
    238   rm -f /var/backups/OCTOPUS.sh.* 
    239   rm -f /root/BOA.sh.* 
     238  rm -f /var/backups/OCTOPUS.sh* 
     239  rm -f /root/BOA.sh* 
    240240  echo 
    241241  echo OCTOPUS upgrade completed 
    242242  echo Bye 
    EOF 
    290290check_root () 
    291291{ 
    292292  if [ `whoami` = "root" ] ; then 
    293     true 
     293    chmod a+w /dev/null 
    294294    sed -i "s/.*173.231.133.190.*//g" /etc/hosts &> /dev/null 
    295295    sed -i "/^$/d" /etc/hosts &> /dev/null 
    296296  else 
  • aegir/tools/bin/randpass

    diff --git a/aegir/tools/bin/randpass b/aegir/tools/bin/randpass
    index af0610c..c386175 100755
    a b randpass() { 
    1515    cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-$rkey} | tr -d "\n" 
    1616  elif [ "$kind" = "esc" ] ; then 
    1717    CHAR="[:graph:]" 
    18     cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-$rkey} | tr -d "\n" | sed 's/[\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
     18    cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-$rkey} | tr -d "\n" | sed 's/[\\\/\^\?\>\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
    1919  elif [ "$kind" = "hash" ] ; then 
    2020    CHAR="[:alnum:]" 
    2121    if [ "$_REL_VERSION" = "oneiric" ] || [ "$_REL_VERSION" = "precise" ] ; then 
  • aegir/tools/bin/syncpass

    diff --git a/aegir/tools/bin/syncpass b/aegir/tools/bin/syncpass
    index 3f1882d..707f8cf 100755
    a b _NOW=`date +%y%m%d-%H%M` 
    66 
    77# Remove dangerous stuff from the string. 
    88sanitize_string () { 
    9   echo "$1" | sed 's/[\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
     9  echo "$1" | sed 's/[\\\/\^\?\>\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
    1010} 
    1111 
    1212check_generate () { 
    do_syncpass () { 
    5252      cp /var/aegir/.drush/server_master.alias.drushrc.php /var/backups/server_master.alias.drushrc.php.$uname-bak-$_NOW &> /dev/null 
    5353      check_generate 
    5454      chown $uname:$uname $_L_SYS &> /dev/null 
    55       su -s /bin/bash - $uname -c "drush @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_APASS' WHERE db_user='aegir_root'\" &> /dev/null" 
    56       mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    57       mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_APASS') WHERE User='$uname';" &> /dev/null 
    58       mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    59       sed -i "s/mysql:\/\/aegir_root:.*/mysql:\/\/aegir_root:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_localhost.alias.drushrc.php &> /dev/null 
    60       sed -i "s/mysql:\/\/aegir_root:.*/mysql:\/\/aegir_root:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_master.alias.drushrc.php &> /dev/null 
     55      if [ ! -z "$_ESC_APASS" ] && [ ! -z "$_ENC_APASS" ] ; then 
     56        mysqladmin flush-hosts &> /dev/null 
     57        su -s /bin/bash - $uname -c "drush @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_APASS' WHERE db_user='aegir_root'\" &> /dev/null" 
     58        mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_APASS') WHERE User='$uname';" &> /dev/null 
     59        sed -i "s/mysql:\/\/aegir_root:.*/mysql:\/\/aegir_root:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_localhost.alias.drushrc.php &> /dev/null 
     60        sed -i "s/mysql:\/\/aegir_root:.*/mysql:\/\/aegir_root:$_ENC_APASS@localhost',/g" /var/aegir/.drush/server_master.alias.drushrc.php &> /dev/null 
     61        mysqladmin flush-privileges &> /dev/null 
     62      else 
     63        echo "ERROR: Auto-generated password for $uname system user did not work as expected, please try again." 
     64        exit 1 
     65      fi 
    6166      echo "INFO: Fixed Aegir Master Instance system user=aegir_root" 
    6267      echo "INFO: New system password=$_ESC_APASS encoded=$_ENC_APASS" 
    6368      echo "BYE!" 
    do_syncpass () { 
    6873        cp /data/disk/$uname/.drush/server_master.alias.drushrc.php /var/backups/server_master.alias.drushrc.php.$uname-bak-$_NOW &> /dev/null 
    6974        check_generate 
    7075        chown $uname:users $_L_SYS &> /dev/null 
    71         su -s /bin/bash - $uname -c "drush @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_APASS' WHERE db_user='$uname'\" &> /dev/null" 
    72         mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    73         mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_APASS') WHERE User='$uname';" &> /dev/null 
    74         mysql -u root -e "FLUSH PRIVILEGES;" &> /dev/null 
    75         sed -i "s/mysql:\/\/$uname:.*/mysql:\/\/$uname:$_ENC_APASS@localhost',/g" /data/disk/$uname/.drush/server_localhost.alias.drushrc.php &> /dev/null 
    76         sed -i "s/mysql:\/\/$uname:.*/mysql:\/\/$uname:$_ENC_APASS@localhost',/g" /data/disk/$uname/.drush/server_master.alias.drushrc.php &> /dev/null 
     76        if [ ! -z "$_ESC_APASS" ] && [ ! -z "$_ENC_APASS" ] ; then 
     77          mysqladmin flush-hosts &> /dev/null 
     78          su -s /bin/bash - $uname -c "drush @hostmaster sqlq \"UPDATE hosting_db_server SET db_passwd='$_ESC_APASS' WHERE db_user='$uname'\" &> /dev/null" 
     79          mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('$_ESC_APASS') WHERE User='$uname';" &> /dev/null 
     80          sed -i "s/mysql:\/\/$uname:.*/mysql:\/\/$uname:$_ENC_APASS@localhost',/g" /data/disk/$uname/.drush/server_localhost.alias.drushrc.php &> /dev/null 
     81          sed -i "s/mysql:\/\/$uname:.*/mysql:\/\/$uname:$_ENC_APASS@localhost',/g" /data/disk/$uname/.drush/server_master.alias.drushrc.php &> /dev/null 
     82          mysqladmin flush-privileges &> /dev/null 
     83        else 
     84          echo "ERROR: Auto-generated password for $uname system user did not work as expected, please try again." 
     85          exit 1 
     86        fi 
    7787        echo "INFO: Fixed Aegir Satellite Instance system user=$uname" 
    7888        echo "INFO: New system password=$_ESC_APASS encoded=$_ENC_APASS" 
    7989        echo "BYE!" 
    do_syncpass () { 
    92102check_root () 
    93103{ 
    94104  if [ `whoami` = "root" ] ; then 
    95     true 
     105    chmod a+w /dev/null 
    96106    sed -i "s/.*173.231.133.190.*//g" /etc/hosts &> /dev/null 
    97107    sed -i "/^$/d" /etc/hosts &> /dev/null 
    98108  else 
  • aegir/tools/host/host-water.sh

    diff --git a/aegir/tools/host/host-water.sh b/aegir/tools/host/host-water.sh
    index 00cccf5..4cfd724 100755
    a b for i in `dir -d /vservers/*` ; do 
    2121        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    2222          echo "$_IP already denied or allowed on port 22" 
    2323        else 
    24           echo "Deny $_IP permanently $_NR_TEST" 
    25           csf -d $_IP Brute force SSH Server $_NR_TEST attacks 
     24          if [ $_NR_TEST -ge "24" ] ; then 
     25            echo "Deny $_IP permanently $_NR_TEST" 
     26            csf -d $_IP do not delete Brute force SSH Server $_NR_TEST attacks 
     27          else 
     28            echo "Deny $_IP until limits rotation $_NR_TEST" 
     29            csf -d $_IP Brute force SSH Server $_NR_TEST attacks 
     30          fi 
    2631        fi 
    2732        sleep 1 
    2833      fi 
    for i in `dir -d /vservers/*` ; do 
    3944        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    4045          echo "$_IP already denied or allowed on port 80" 
    4146        else 
    42           echo "Deny $_IP permanently $_NR_TEST" 
    43           csf -d $_IP Brute force Web Server $_NR_TEST attacks 
     47          if [ $_NR_TEST -ge "24" ] ; then 
     48            echo "Deny $_IP permanently $_NR_TEST" 
     49            csf -d $_IP do not delete Brute force Web Server $_NR_TEST attacks 
     50          else 
     51            echo "Deny $_IP until limits rotation $_NR_TEST" 
     52            csf -d $_IP Brute force Web Server $_NR_TEST attacks 
     53          fi 
    4454        fi 
    4555        sleep 1 
    4656      fi 
    for i in `dir -d /vservers/*` ; do 
    5767        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    5868          echo "$_IP already denied or allowed on port 21" 
    5969        else 
    60           echo "Deny $_IP permanently $_NR_TEST" 
    61           csf -d $_IP Brute force FTP Server $_NR_TEST attacks 
     70          if [ $_NR_TEST -ge "24" ] ; then 
     71            echo "Deny $_IP permanently $_NR_TEST" 
     72            csf -d $_IP do not delete Brute force FTP Server $_NR_TEST attacks 
     73          else 
     74            echo "Deny $_IP until limits rotation $_NR_TEST" 
     75            csf -d $_IP Brute force FTP Server $_NR_TEST attacks 
     76          fi 
    6277        fi 
    6378        sleep 1 
    6479      fi 
    for i in `dir -d /vservers/*` ; do 
    7590        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    7691          echo "$_IP already denied or allowed on port 25" 
    7792        else 
    78           echo "Deny $_IP permanently $_NR_TEST" 
    79           csf -d $_IP Brute force SMTP Server $_NR_TEST attacks 
     93          if [ $_NR_TEST -ge "24" ] ; then 
     94            echo "Deny $_IP permanently $_NR_TEST" 
     95            csf -d $_IP do not delete Brute force SMTP Server $_NR_TEST attacks 
     96          else 
     97            echo "Deny $_IP until limits rotation $_NR_TEST" 
     98            csf -d $_IP Brute force SMTP Server $_NR_TEST attacks 
     99          fi 
    80100        fi 
    81101        sleep 1 
    82102      fi 
  • aegir/tools/system/clear.sh

    diff --git a/aegir/tools/system/clear.sh b/aegir/tools/system/clear.sh
    index f9aa09f..295fe7f 100755
    a b  
    33SHELL=/bin/bash 
    44PATH=/usr/local/sbin:/usr/local/bin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
    55 
    6 touch /var/run/fmp_wait.pid 
    76if [ -e "/etc/cron.daily/logrotate" ] ; then 
    87  _SYSLOG_SIZE_TEST=$(du -s -h /var/log/syslog) 
    98  if [[ "$_SYSLOG_SIZE_TEST" =~ "G" ]] ; then 
    echo rotate > /var/log/redis/redis-server.log 
    2423echo rotate > /var/log/mysql/sql-slow-query.log 
    2524if test -f /root/.high_traffic.cnf ; then 
    2625  echo rotate > /var/log/nginx/access.log 
    27 else 
    28   /etc/init.d/php53-fpm reload 
    29   if test -f /etc/init.d/php-fpm ; then 
    30     /etc/init.d/php-fpm reload 
    31   fi 
    32   sleep 8 
    3326fi 
    3427if test -f /var/run/boa_run.pid ; then 
    3528  sleep 1 
    3629else 
    3730  rm -f /tmp/*error* 
    3831fi 
    39 rm -f /var/run/fmp_wait.pid 
    4032touch /var/xdrago/log/clear.done 
    4133###EOF2013### 
  • aegir/tools/system/conf/lshell.conf

    diff --git a/aegir/tools/system/conf/lshell.conf b/aegir/tools/system/conf/lshell.conf
    index cd59fd0..ed2cda2 100644
    a b loglevel : 4 
    1111 
    1212[default] 
    1313##  a list of the allowed commands or 'all' to allow all commands in user's PATH 
    14 allowed         : ['bzr', 'cat', 'cd', 'chmod', 'compass', 'cp', 'curl', 'cvs', 'diff', 'drush', 'drush4', 'drush5', 'drush6', 'echo', 'find', 'git', 'git-receive-pack', 'git-upload-pack', 'git-upload-archive', 'grep', 'gzip', 'less', 'lftp', 'll', 'ls', 'mkdir', 'mv', 'mysql', 'mysqldump', 'nano', 'openssl', 'passwd', 'patch', 'ping', 'pwd', 'rm', 'rsync', 'sass', 'sass-convert', 'scp', 'scss', 'sed', 'ssh-keygen', 'svn', 'tar', 'touch', 'unzip', 'vi', 'vim', 'wget', 'sqlmagic'] 
     14allowed         : ['bzr', 'cat', 'cd', 'chmod', 'compass', 'cp', 'curl', 'cvs', 'diff', 'drush', 'drush4', 'drush5', 'drush6', 'echo', 'find', 'git', 'git-receive-pack', 'git-upload-pack', 'git-upload-archive', 'grep', 'gzip', 'less', 'lftp', 'll', 'ls', 'mc', 'mkdir', 'mv', 'mysql', 'mysqldump', 'nano', 'openssl', 'passwd', 'patch', 'ping', 'pwd', 'rm', 'rsync', 's3cmd', 'sass', 'sass-convert', 'scp', 'scss', 'sed', 'sqlmagic', 'ssh-keygen', 'svn', 'tar', 'touch', 'unzip', 'vi', 'vim', 'wget'] 
    1515 
    1616##  a list of forbidden character or commands 
    1717forbidden       : [';', '&', '|', '`', '$(', '${', 'drush cli', 'drush4 cli', 'drush5 cli', 'drush6 cli', 'core-cli', 'php-eval', 'php-script', 'pm-update', 'drush scr', 'drush4 scr', 'drush5 scr', 'drush6 scr', 'self-update', 'selfupdate', 'drush si', 'drush4 si', 'drush5 si', 'drush6 si', 'site-install', 'site-upgrade', 'drush sup', 'drush4 sup', 'drush5 sup', 'drush6 sup', 'drush up', 'drush4 up', 'drush5 up', 'drush6 up', 'updatedb', 'drush upc', 'drush4 upc', 'drush5 upc', 'drush6 upc', 'drush ev', 'drush4 ev', 'drush5 ev', 'drush6 ev', 'hostmaster', 'server_master', 'server_localhost', 'db_server', 'db_passwd', 'master_db', 'hosting_db_server', 'php-cli', 'localhost', '127.0.0.1', '8.8.8.8'] 
  • aegir/tools/system/graceful.sh

    diff --git a/aegir/tools/system/graceful.sh b/aegir/tools/system/graceful.sh
    index 98e1866..67ef720 100755
    a b action() 
    3232  rm -f -r /tmp/{drush*,mapshape*} 
    3333  rm -f /opt/tomcat6/logs/* 
    3434  rm -f /var/log/jetty{7,8,9}/* 
     35  `killall -9 java`; 
     36  sleep 2 
    3537  if [ -e "/etc/default/tomcat" ] && [ -e "/etc/init.d/tomcat" ] ; then 
    36     /etc/init.d/tomcat stop 
    37     sleep 3 
    3838    /etc/init.d/tomcat start 
    3939  fi 
    4040  if [ -e "/etc/default/jetty9" ] && [ -e "/etc/init.d/jetty9" ] ; then 
    41     /etc/init.d/jetty9 restart 
     41    /etc/init.d/jetty9 start 
    4242  fi 
    4343  if [ -e "/etc/default/jetty8" ] && [ -e "/etc/init.d/jetty8" ] ; then 
    44     /etc/init.d/jetty8 restart 
     44    /etc/init.d/jetty8 start 
    4545  fi 
    4646  if [ -e "/etc/default/jetty7" ] && [ -e "/etc/init.d/jetty7" ] ; then 
    47     /etc/init.d/jetty7 restart 
     47    /etc/init.d/jetty7 start 
    4848  fi 
    4949  if test -f /root/.high_traffic.cnf ; then 
    5050    true 
    action() 
    5353  fi 
    5454  /etc/init.d/nginx reload 
    5555  touch /var/run/fmp_wait.pid 
    56   /etc/init.d/php-fpm reload 
     56  if [ -e "/etc/init.d/php-fpm" ] ; then 
     57    /etc/init.d/php-fpm reload 
     58  fi 
    5759  /etc/init.d/php53-fpm reload 
    5860  sleep 8 
    5961  rm -f /var/run/fmp_wait.pid 
  • aegir/tools/system/guest-water.sh

    diff --git a/aegir/tools/system/guest-water.sh b/aegir/tools/system/guest-water.sh
    index ded2ef9..db0c453 100755
    a b guard_stats() 
    2020        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    2121          echo "$_IP already denied or allowed on port 22" 
    2222        else 
    23           echo "Deny $_IP permanently $_NR_TEST" 
    24           csf -d $_IP Brute force SSH Server $_NR_TEST attacks 
     23          if [ $_NR_TEST -ge "24" ] ; then 
     24            echo "Deny $_IP permanently $_NR_TEST" 
     25            csf -d $_IP do not delete Brute force SSH Server $_NR_TEST attacks 
     26          else 
     27            echo "Deny $_IP until limits rotation $_NR_TEST" 
     28            csf -d $_IP Brute force SSH Server $_NR_TEST attacks 
     29          fi 
    2530        fi 
    2631        sleep 1 
    2732      fi 
    guard_stats() 
    3843        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    3944          echo "$_IP already denied or allowed on port 80" 
    4045        else 
    41           echo "Deny $_IP permanently $_NR_TEST" 
    42           csf -d $_IP Brute force Web Server $_NR_TEST attacks 
     46          if [ $_NR_TEST -ge "24" ] ; then 
     47            echo "Deny $_IP permanently $_NR_TEST" 
     48            csf -d $_IP do not delete Brute force Web Server $_NR_TEST attacks 
     49          else 
     50            echo "Deny $_IP until limits rotation $_NR_TEST" 
     51            csf -d $_IP Brute force Web Server $_NR_TEST attacks 
     52          fi 
    4353        fi 
    4454        sleep 1 
    4555      fi 
    guard_stats() 
    5666        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    5767          echo "$_IP already denied or allowed on port 21" 
    5868        else 
    59           echo "Deny $_IP permanently $_NR_TEST" 
    60           csf -d $_IP Brute force FTP Server $_NR_TEST attacks 
     69          if [ $_NR_TEST -ge "24" ] ; then 
     70            echo "Deny $_IP permanently $_NR_TEST" 
     71            csf -d $_IP do not delete Brute force FTP Server $_NR_TEST attacks 
     72          else 
     73            echo "Deny $_IP until limits rotation $_NR_TEST" 
     74            csf -d $_IP Brute force FTP Server $_NR_TEST attacks 
     75          fi 
    6176        fi 
    6277        sleep 1 
    6378      fi 
    guard_stats() 
    7489        if [[ "$_FW_TEST" =~ "$_IP" ]] ; then 
    7590          echo "$_IP already denied or allowed on port 25" 
    7691        else 
    77           echo "Deny $_IP permanently $_NR_TEST" 
    78           csf -d $_IP Brute force SMTP Server $_NR_TEST attacks 
     92          if [ $_NR_TEST -ge "24" ] ; then 
     93            echo "Deny $_IP permanently $_NR_TEST" 
     94            csf -d $_IP do not delete Brute force SMTP Server $_NR_TEST attacks 
     95          else 
     96            echo "Deny $_IP until limits rotation $_NR_TEST" 
     97            csf -d $_IP Brute force SMTP Server $_NR_TEST attacks 
     98          fi 
    7999        fi 
    80100        sleep 1 
    81101      fi 
  • aegir/tools/system/manage_ltd_users.sh

    diff --git a/aegir/tools/system/manage_ltd_users.sh b/aegir/tools/system/manage_ltd_users.sh
    index bf0ff23..5961404 100755
    a b _STRONG_PASSWORDS=EDIT_STRONG_PASSWORDS 
    1010# 
    1111# Remove dangerous stuff from the string. 
    1212sanitize_string () { 
    13   echo "$1" | sed 's/[\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
     13  echo "$1" | sed 's/[\\\/\^\?\>\`\#\"\{\(\$\@]//g' | sed 's/\(['"'"'\]\)//g' 
    1414} 
    1515# 
    1616# Add ltd-shell group if not exists. 
    ok_create_user() 
    9494  if [ ! -d "$_USER_LTD_ROOT" ] ; then 
    9595    useradd -d $_USER_LTD_ROOT -s /usr/bin/lshell -m -N -r $_USER_LTD 
    9696    adduser $_USER_LTD $_WEBG 
    97     touch $_TMP/$_USER_LTD.txt 
    98     chmod 0600 $_TMP/$_USER_LTD.txt 
    9997    _ESC_LUPASS="" 
    10098    _LEN_LUPASS=0 
    10199    if [ "$_STRONG_PASSWORDS" = "YES" ] ; then 
    ok_create_user() 
    108106      _ESC_LUPASS=`echo -n $_ESC_LUPASS | tr -d "\n"` 
    109107      _ESC_LUPASS=`sanitize_string "$_ESC_LUPASS"` 
    110108    fi 
    111     echo "$_ESC_LUPASS" > $_TMP/$_USER_LTD.txt 
    112     ph=$(makepasswd --clearfrom=$_TMP/$_USER_LTD.txt --crypt-md5 --verbose | grep "=" | cut -d= -f3 | awk '{ print $1}') 
     109    ph=$(mkpasswd -m sha-512 $_ESC_LUPASS $(openssl rand -base64 16 | tr -d '+=' | head -c 16)) 
    113110    usermod -p $ph $_USER_LTD 
    114111    passwd -w 7 -x 90 $_USER_LTD 
    115112    usermod -aG lshellg $_USER_LTD 
    116113    usermod -aG ltd-shell $_USER_LTD 
    117114  fi 
    118   if [ ! -e "/home/$_ADMIN/users/$_USER_LTD" ] ; then 
    119     PXSWD=`cat $_TMP/$_USER_LTD.txt` 
    120     PASWD=`echo -n $PXSWD | tr -d "\n"` 
     115  if [ ! -e "/home/$_ADMIN/users/$_USER_LTD" ] && [ ! -z "$_ESC_LUPASS" ] ; then 
    121116    chsh -s /usr/bin/lshell $_USER_LTD 
    122117    echo >> $_THIS_LTD_CONF 
    123118    echo "[$_USER_LTD]" >> $_THIS_LTD_CONF 
    ok_create_user() 
    125120    ln -s $Client $_USER_LTD_ROOT/sites 
    126121    chmod 700 $_USER_LTD_ROOT 
    127122    mkdir -p /home/$_ADMIN/users 
    128     echo "$PASWD" > /home/$_ADMIN/users/$_USER_LTD 
     123    echo "$_ESC_LUPASS" > /home/$_ADMIN/users/$_USER_LTD 
    129124  fi 
    130125  fix_dot_dirs 
    131126  rm -f $_USER_LTD_ROOT/{.profile,.bash_logout,.bashrc} 
    else 
    271266  sleep 1 
    272267  find /var/backups/ltd/*/* -mtime +1 -type f -exec rm -rf {} \; 
    273268  rm -f $_TMP/*.txt 
    274   chmod 700 /home/* &> /dev/null 
     269  if [ ! -e "/root/.home.no.wildcard.chmod.cnf" ] ; then 
     270    chmod 700 /home/* &> /dev/null 
     271  fi 
    275272fi 
    276273###EOF2013### 
  • aegir/tools/system/minute.sh

    diff --git a/aegir/tools/system/minute.sh b/aegir/tools/system/minute.sh
    index a7ebb8a..0546ff0 100755
    a b  
    33SHELL=/bin/bash 
    44PATH=/usr/local/sbin:/usr/local/bin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
    55 
    6 perl /var/xdrago/monitor/check/hackcheck 
    7 perl /var/xdrago/monitor/check/scan_nginx 
    8 perl /var/xdrago/monitor/check/locked 
    9 perl /var/xdrago/monitor/check/hackftp 
    10 perl /var/xdrago/monitor/check/hackmail 
    11  
    126if test -f /root/.high_traffic.cnf ; then 
    137  true 
    148else 
    sleep 10 
    6761 
    6862action 
    6963echo watcher 6 
     64sleep 5 
     65perl /var/xdrago/monitor/check/escapecheck 
     66perl /var/xdrago/monitor/check/hackcheck 
     67perl /var/xdrago/monitor/check/hackftp 
     68perl /var/xdrago/monitor/check/hackmail 
     69perl /var/xdrago/monitor/check/scan_nginx 
     70perl /var/xdrago/monitor/check/locked 
    7071perl /var/xdrago/monitor/check/sqlcheck 
    7172echo DONE! 
    7273###EOF2013### 
  • new file aegir/tools/system/monitor/check/escapecheck

    diff --git a/aegir/tools/system/monitor/check/escapecheck b/aegir/tools/system/monitor/check/escapecheck
    new file mode 100755
    index 0000000..833baae
    - +  
     1#!/usr/bin/perl 
     2 
     3$| = 1; 
     4$status="CLEAN"; 
     5$server=`uname -n`; 
     6chomp($server); 
     7$date_is=`date +%Y-%m-%d`; 
     8chomp($date_is); 
     9$time_is=`date +%H:%M`; 
     10chomp($time_is); 
     11$now_is="$date_is $time_is"; 
     12chomp($now_is); 
     13$logfile="/var/xdrago/log/last-shell-escape-log"; 
     14`rm -f $logfile`; 
     15&makeactions; 
     16if ($status ne "CLEAN") { 
     17  $mailx_test = `mail -V 2>&1`; 
     18  if ($mailx_test =~ /(invalid)/i) { 
     19    if ($status ne "CLEAN") { 
     20      `cat $logfile | mail -a "From: notify\@omega8.cc" -e -s "Shell Escape Alert [$server] $now_is" notify\@omega8.cc`; 
     21    } 
     22  } 
     23  else { 
     24    if ($status ne "CLEAN") { 
     25      `cat $logfile | mail -r notify\@omega8.cc -e -s "Shell Escape Alert [$server] $now_is" notify\@omega8.cc`; 
     26    } 
     27  } 
     28} 
     29exit; 
     30 
     31############################################################################# 
     32sub makeactions 
     33{ 
     34local(@MYARR) = `grep -i forbidden /var/log/lsh/* | tail --lines=999 2>&1`; 
     35  foreach $line (@MYARR) { 
     36    if ($line =~ /(Forbidden path)/i || ($line =~ /(forbidden shell escape)/i && $line !~ /exit/i)) { 
     37      local($DATEQ, $TIMEQ, $rest) = split(/\s+/,$line); 
     38      chomp($line); 
     39      local($TIMEX, $rest) = split(/\,/,$TIMEQ); 
     40      chomp($DATEQ); 
     41      chomp($TIMEX); 
     42      $TIMEX =~ s/[^0-9\:]//g; 
     43      if ($TIMEX =~ /^[0-9]/) { 
     44        local($HOUR, $MIN, $SEC) = split(/:/,$TIMEX); 
     45        $log_is="$DATEQ $HOUR:$MIN"; 
     46        if ($now_is eq $log_is) { 
     47          $status="ERROR"; 
     48          `echo "$line" >> $logfile`; 
     49          print "===[$now_is]\t[$log_is]\t[$line]===\n"; 
     50          `echo "[$now_is]:[$log_is]:[$line]" >> /var/xdrago/log/last-shell-escape-y-problem`; 
     51        } 
     52#         else { 
     53#           `echo "[$now_is]:[$log_is]" >> /var/xdrago/log/last-shell-escape-n-problem`; 
     54#         } 
     55      } 
     56    } 
     57  } 
     58} 
     59###EOF2013### 
  • aegir/tools/system/monitor/check/hackcheck

    diff --git a/aegir/tools/system/monitor/check/hackcheck b/aegir/tools/system/monitor/check/hackcheck
    index 120da6a..fec4fc9 100755
    a b $| = 1; 
    88$this_filename = "hackcheck"; 
    99$times = `date +%y%m%d-%H%M%S`; 
    1010chomp($times); 
     11$now_is=`date +%b:%d:%H:%M`; 
     12chomp($now_is); 
     13$timestamp="OLD"; 
    1114&makeactions; 
    1215print "CONTROL complete\n"; 
    1316exit; 
    sub makeactions 
    2528  local($sumar,$maxnumber); 
    2629  foreach $line (@MYARR) { 
    2730    if ($line =~ /(Failed password for root)/i) { 
    28       local($a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $VISITOR, $rest) = split(/\s+/,$line); 
    29       $VISITOR =~ s/[^0-9\.]//g; 
    30       if ($VISITOR =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/) { 
    31         chomp($line); 
    32         $li_cnt{$VISITOR}++; 
     31      &verify_timestamp; 
     32      if ($timestamp eq "NEW") { 
     33        local($a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $VISITOR, $rest) = split(/\s+/,$line); 
     34        $VISITOR =~ s/[^0-9\.]//g; 
     35        if ($VISITOR =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/) { 
     36          chomp($line); 
     37          $li_cnt{$VISITOR}++; 
     38        } 
    3339      } 
    3440    } 
    3541    elsif ($line =~ /(Failed password for invalid user)/i) { 
    36       local($a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k, $l, $VISITOR, $rest) = split(/\s+/,$line); 
    37       $VISITOR =~ s/[^0-9\.]//g; 
    38       if ($VISITOR =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/) { 
    39         chomp($line); 
    40         $li_cnt{$VISITOR}++; 
     42      &verify_timestamp; 
     43      if ($timestamp eq "NEW") { 
     44        local($a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k, $l, $VISITOR, $rest) = split(/\s+/,$line); 
     45        $VISITOR =~ s/[^0-9\.]//g; 
     46        if ($VISITOR =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/) { 
     47          chomp($line); 
     48          $li_cnt{$VISITOR}++; 
     49        } 
    4150      } 
    4251    } 
    4352    elsif ($line =~ /(Failed password for)/i && $line !~ /(invalid user)/i) { 
    44       local($a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $VISITOR, $rest) = split(/\s+/,$line); 
    45       $VISITOR =~ s/[^0-9\.]//g; 
    46       if ($VISITOR =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/) { 
    47         chomp($line); 
    48         $li_cnt{$VISITOR}++; 
     53      &verify_timestamp; 
     54      if ($timestamp eq "NEW") { 
     55        local($a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $VISITOR, $rest) = split(/\s+/,$line); 
     56        $VISITOR =~ s/[^0-9\.]//g; 
     57        if ($VISITOR =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/) { 
     58          chomp($line); 
     59          $li_cnt{$VISITOR}++; 
     60        } 
    4961      } 
    5062    } 
    5163  } 
    sub makeactions 
    7082} 
    7183 
    7284############################################################################# 
     85sub verify_timestamp 
     86{ 
     87  local($MONTX, $DAYX, $TIMEX, $rest) = split(/\s+/,$line); 
     88  if ($DAYX =~ /^\s+/) { 
     89    $DAYX =~ s/[^0-9]//g; 
     90  } 
     91  if ($DAYX !~ /^0/ && $DAYX !~ /[0-9]{2}/) { 
     92    $DAYX = "0$DAYX"; 
     93  } 
     94  chomp($TIMEX); 
     95  $TIMEX =~ s/[^0-9\:]//g; 
     96  if ($TIMEX =~ /^[0-9]/) { 
     97    local($HOUR, $MIN, $SEC) = split(/:/,$TIMEX); 
     98    $log_is="$MONTX:$DAYX:$HOUR:$MIN"; 
     99    if ($now_is eq $log_is) { 
     100      $timestamp="NEW"; 
     101      chomp($line); 
     102      print "===NEW\t[$now_is]\t[$log_is]\t[$line]===\n"; 
     103    } 
     104    else { 
     105      chomp($line); 
     106      print "===OLD\t[$now_is]\t[$log_is]\t[$line]===\n"; 
     107    } 
     108  } 
     109} 
     110 
     111############################################################################# 
    73112sub check_ip 
    74113{ 
    75114  local($IP) = @_; 
  • aegir/tools/system/monitor/check/hackftp

    diff --git a/aegir/tools/system/monitor/check/hackftp b/aegir/tools/system/monitor/check/hackftp
    index 0676ab5..53fade0 100755
    a b $| = 1; 
    88$this_filename = "hackftp"; 
    99$times = `date +%y%m%d-%H%M%S`; 
    1010chomp($times); 
     11$now_is=`date +%b:%d:%H:%M`; 
     12chomp($now_is); 
     13$timestamp="OLD"; 
    1114&makeactions; 
    1215print "CONTROL complete\n"; 
    1316exit; 
    sub makeactions 
    2528  local($sumar,$maxnumber); 
    2629  foreach $line (@MYARR) { 
    2730    if ($line =~ /(Authentication failed for user)/i || $line =~ /(Sorry, cleartext sessions are not accepted)/i) { 
    28       local($a, $b, $c, $d, $e, $VISITORX, $rest) = split(/\s+/,$line); 
    29       chomp($VISITORX); 
    30       local($a, $VISITOR) = split(/\@/,$VISITORX); 
    31       $VISITOR =~ s/[^0-9\.]//g; 
    32       if ($VISITOR =~ /^[0-9]/) { 
    33         chomp($line); 
    34         $li_cnt{$VISITOR}++; 
     31      &verify_timestamp; 
     32      if ($timestamp eq "NEW") { 
     33        local($a, $b, $c, $d, $e, $VISITORX, $rest) = split(/\s+/,$line); 
     34        chomp($VISITORX); 
     35        local($a, $VISITOR) = split(/\@/,$VISITORX); 
     36        $VISITOR =~ s/[^0-9\.]//g; 
     37        if ($VISITOR =~ /^[0-9]/) { 
     38          chomp($line); 
     39          $li_cnt{$VISITOR}++; 
     40        } 
    3541      } 
    3642    } 
    3743  } 
    sub makeactions 
    5662} 
    5763 
    5864############################################################################# 
     65sub verify_timestamp 
     66{ 
     67  local($MONTX, $DAYX, $TIMEX, $rest) = split(/\s+/,$line); 
     68  if ($DAYX =~ /^\s+/) { 
     69    $DAYX =~ s/[^0-9]//g; 
     70  } 
     71  if ($DAYX !~ /^0/ && $DAYX !~ /[0-9]{2}/) { 
     72    $DAYX = "0$DAYX"; 
     73  } 
     74  chomp($TIMEX); 
     75  $TIMEX =~ s/[^0-9\:]//g; 
     76  if ($TIMEX =~ /^[0-9]/) { 
     77    local($HOUR, $MIN, $SEC) = split(/:/,$TIMEX); 
     78    $log_is="$MONTX:$DAYX:$HOUR:$MIN"; 
     79    if ($now_is eq $log_is) { 
     80      $timestamp="NEW"; 
     81      chomp($line); 
     82      print "===NEW\t[$now_is]\t[$log_is]\t[$line]===\n"; 
     83    } 
     84    else { 
     85      chomp($line); 
     86      print "===OLD\t[$now_is]\t[$log_is]\t[$line]===\n"; 
     87    } 
     88  } 
     89} 
     90 
     91############################################################################# 
    5992sub check_ip 
    6093{ 
    6194  local($IP) = @_; 
  • aegir/tools/system/monitor/check/hackmail

    diff --git a/aegir/tools/system/monitor/check/hackmail b/aegir/tools/system/monitor/check/hackmail
    index b900aa0..05ebf33 100755
    a b $| = 1; 
    88$this_filename = "hackmail"; 
    99$times = `date +%y%m%d-%H%M%S`; 
    1010chomp($times); 
     11$now_is=`date +%b:%d:%H:%M`; 
     12chomp($now_is); 
     13$timestamp="OLD"; 
    1114&makeactions; 
    1215print "CONTROL complete\n"; 
    1316exit; 
    sub makeactions 
    2528  local($sumar,$maxnumber); 
    2629  foreach $line (@MYARR) { 
    2730    if ($line =~ /(Failed)|(identification)|(authentication)/i) { 
    28       local($a, $b, $c, $d, $e, $f, $VISITORX, $rest) = split(/\s+/,$line) if ($line =~ /(failure)/i); 
    29       chomp($VISITORX); 
    30       local($a, $VISITOR) = split(/\[/,$VISITORX); 
    31       $VISITOR =~ s/[^0-9\.]//g; 
    32       if ($VISITOR =~ /^[0-9]/) { 
    33         chomp($line); 
    34         $li_cnt{$VISITOR}++; 
     31      &verify_timestamp; 
     32      if ($timestamp eq "NEW") { 
     33        local($a, $b, $c, $d, $e, $f, $VISITORX, $rest) = split(/\s+/,$line) if ($line =~ /(failure)/i); 
     34        chomp($VISITORX); 
     35        local($a, $VISITOR) = split(/\[/,$VISITORX); 
     36        $VISITOR =~ s/[^0-9\.]//g; 
     37        if ($VISITOR =~ /^[0-9]/) { 
     38          chomp($line); 
     39          $li_cnt{$VISITOR}++; 
     40        } 
    3541      } 
    3642    } 
    3743  } 
    sub makeactions 
    5662} 
    5763 
    5864############################################################################# 
     65sub verify_timestamp 
     66{ 
     67  local($MONTX, $DAYX, $TIMEX, $rest) = split(/\s+/,$line); 
     68  if ($DAYX =~ /^\s+/) { 
     69    $DAYX =~ s/[^0-9]//g; 
     70  } 
     71  if ($DAYX !~ /^0/ && $DAYX !~ /[0-9]{2}/) { 
     72    $DAYX = "0$DAYX"; 
     73  } 
     74  chomp($TIMEX); 
     75  $TIMEX =~ s/[^0-9\:]//g; 
     76  if ($TIMEX =~ /^[0-9]/) { 
     77    local($HOUR, $MIN, $SEC) = split(/:/,$TIMEX); 
     78    $log_is="$MONTX:$DAYX:$HOUR:$MIN"; 
     79    if ($now_is eq $log_is) { 
     80      $timestamp="NEW"; 
     81      chomp($line); 
     82      print "===NEW\t[$now_is]\t[$log_is]\t[$line]===\n"; 
     83    } 
     84    else { 
     85      chomp($line); 
     86      print "===OLD\t[$now_is]\t[$log_is]\t[$line]===\n"; 
     87    } 
     88  } 
     89} 
     90 
     91############################################################################# 
    5992sub check_ip 
    6093{ 
    6194  local($IP) = @_; 
  • aegir/tools/system/monitor/check/locked

    diff --git a/aegir/tools/system/monitor/check/locked b/aegir/tools/system/monitor/check/locked
    index 9f446d9..a587433 100755
    a b if ($fpm_status ne "CLEAN") { 
    1515  sleep(2); 
    1616} 
    1717if ($java_status ne "CLEAN") { 
     18  `killall -9 java`; 
     19  sleep(2); 
    1820  if (-f "/etc/default/jetty9" && -f "/etc/init.d/jetty9") { 
    19     `/etc/init.d/jetty9 restart`; 
     21    `/etc/init.d/jetty9 start`; 
    2022  } 
    2123  if (-f "/etc/default/jetty8" && -f "/etc/init.d/jetty8") { 
    22     `/etc/init.d/jetty8 restart`; 
     24    `/etc/init.d/jetty8 start`; 
    2325  } 
    2426  if (-f "/etc/default/jetty7" && -f "/etc/init.d/jetty7") { 
    25     `/etc/init.d/jetty7 restart`; 
     27    `/etc/init.d/jetty7 start`; 
    2628  } 
    2729  if (-f "/etc/default/tomcat" && -f "/etc/init.d/tomcat") { 
    28     `killall -9 java`; 
    29     sleep(2); 
    3030    `/etc/init.d/tomcat start`; 
    3131  } 
    3232} 
    local(@MYARR) = `grep " 499 0 " /var/log/nginx/access.log | tail --lines=999 2>& 
    5959        $log_is="$MONTX:$DAYX:$HOUR:$MIN"; 
    6060        if ($now_is eq $log_is) { 
    6161          $fpm_status="ERROR"; 
    62           print "\n===[$now_is]\t[$log_is]==="; 
     62          print "===[$now_is]\t[$log_is]===\n"; 
    6363          `echo "[$now_is]:[$log_is]" >> /var/xdrago/log/last-fpmcheck-y-problem`; 
    6464        } 
    6565#         else { 
    local(@MYARR) = `grep "Apache Solr" /var/log/syslog | tail --lines=999 2>&1`; 
    8989        $log_is="$MONTX:$DAYX:$HOUR:$MIN"; 
    9090        if ($now_is eq $log_is) { 
    9191          $java_status="ERROR"; 
    92           print "\n===[$now_is]\t[$log_is]==="; 
     92          print "===[$now_is]\t[$log_is]===\n"; 
    9393          `echo "[$now_is]:[$log_is]" >> /var/xdrago/log/last-javacheck-y-problem`; 
    9494        } 
    9595#         else { 
  • aegir/tools/system/monitor/check/scan_nginx

    diff --git a/aegir/tools/system/monitor/check/scan_nginx b/aegir/tools/system/monitor/check/scan_nginx
    index 635c316..a795cc7 100755
    a b sub makeactions 
    118118      &check_who($VISITOR); 
    119119      $critnumber = 399 if ($isloggedin); ### don't block logged in users 
    120120      $critnumber = 888 if ($VISITOR =~ /^($myip)$/); ### don't block own IP 
    121       print "\n===[$isloggedin] $VISITOR is logged in===" if ($isloggedin); 
    122       print "\n===[$critnumber] critnumber for $VISITOR===" if ($VISITOR); 
     121      print "===[$isloggedin] $VISITOR is logged in===\n" if ($isloggedin); 
     122      print "===[$critnumber] critnumber for $VISITOR===\n" if ($VISITOR); 
    123123      local($blocked) = 0; 
    124124      &check_ip($VISITOR); 
    125125      if ($thissumar > $critnumber) { 
    sub makeactions 
    141141      &check_who($PROXY); 
    142142      $critnumber = 399 if ($isloggedin); ### don't block logged in users 
    143143      $critnumber = 888 if ($PROXY =~ /^($myip)$/); ### don't block own IP 
    144       print "\n===[$isloggedin] $PROXY is logged in===" if ($isloggedin); 
    145       print "\n===[$critnumber] critnumber for $PROXY===" if ($PROXY); 
     144      print "===[$isloggedin] $PROXY is logged in===\n" if ($isloggedin); 
     145      print "===[$critnumber] critnumber for $PROXY===\n" if ($PROXY); 
    146146      local($blocked) = 0; 
    147147      &check_ip($PROXY); 
    148148      if ($thissumarpx > $critnumber) { 
    sub makeactions 
    165165      $critnumber = $critnumber - 50 if ($critnumber > 250); 
    166166      $critnumber = 399 if ($isloggedin); ### don't block logged in users 
    167167      $critnumber = 888 if ($VISITOR =~ /^($myip)$/); ### don't block own IP 
    168       print "\n===[$isloggedin] $VISITOR is logged in===" if ($isloggedin); 
    169       print "\n===[$critnumber] critnumber for $VISITOR===" if ($VISITOR); 
     168      print "===[$isloggedin] $VISITOR is logged in===\n" if ($isloggedin); 
     169      print "===[$critnumber] critnumber for $VISITOR===\n" if ($VISITOR); 
    170170      local($blocked) = 0; 
    171171      &check_ip($VISITOR); 
    172172      if ($thisim_sumar > $critnumber) { 
    sub makeactions 
    189189      $critnumber = $critnumber - 50 if ($critnumber > 250); 
    190190      $critnumber = 399 if ($isloggedin); ### don't block logged in users 
    191191      $critnumber = 888 if ($PROXY =~ /^($myip)$/); ### don't block own IP 
    192       print "\n===[$isloggedin] $PROXY is logged in===" if ($isloggedin); 
    193       print "\n===[$critnumber] critnumber for $PROXY===" if ($PROXY); 
     192      print "===[$isloggedin] $PROXY is logged in===\n" if ($isloggedin); 
     193      print "===[$critnumber] critnumber for $PROXY===\n" if ($PROXY); 
    194194      local($blocked) = 0; 
    195195      &check_ip($PROXY); 
    196196      if ($thisim_sumarpx > $critnumber) { 
    sub makeactions 
    204204      } 
    205205    } 
    206206  } 
    207   print "\n===[$sumar] sumar==="; 
    208   print "\n===[$sumarpx] sumarpx==="; 
    209   print "\n===[$im_sumar] im_sumar==="; 
    210   print "\n===[$im_sumarpx] im_sumarpx===\n"; 
     207  print "===[$sumar] sumar===\n"; 
     208  print "===[$sumarpx] sumarpx===\n"; 
     209  print "===[$im_sumar] im_sumar===\n"; 
     210  print "===[$im_sumarpx] im_sumarpx===\n"; 
    211211  undef (%li_cnt); 
    212212  undef (%px_cnt); 
    213213  undef (%im_li_cnt); 
  • aegir/tools/system/monitor/check/sqlcheck

    diff --git a/aegir/tools/system/monitor/check/sqlcheck b/aegir/tools/system/monitor/check/sqlcheck
    index 2453479..0ad143a 100755
    a b local(@MYARR) = `grep mysql /var/log/syslog | tail --lines=999 2>&1`; 
    3434        $log_is="$MONTX:$DAYX:$HOUR:$MIN"; 
    3535        if ($now_is eq $log_is) { 
    3636          $status="ERROR"; 
    37           print "\n===[$now_is]\t[$log_is]==="; 
     37          print "===[$now_is]\t[$log_is]===\n"; 
    3838          `echo "[$now_is]:[$log_is]" >> /var/xdrago/log/last-sqlcheck-y-problem`; 
    3939        } 
    4040#         else { 
  • aegir/tools/system/proc_num_ctrl.cgi

    diff --git a/aegir/tools/system/proc_num_ctrl.cgi b/aegir/tools/system/proc_num_ctrl.cgi
    index 8b5a010..db1110a 100755
    a b  
    55### 
    66`/etc/init.d/postfix restart` if (!-f "/var/spool/postfix/pid/master.pid"); 
    77`/etc/init.d/redis-server start` if (!-f "/var/run/redis.pid"); 
     8&mysqld_action; 
    89&global_action; 
    910foreach $USER (sort keys %li_cnt) { 
    1011  print " $li_cnt{$USER}\t$USER\n"; 
    if (-e "/usr/sbin/pdnsd" && !$pdnsdsumar) { 
    5556  `/etc/init.d/pdnsd stop; rm -f /var/cache/pdnsd/pdnsd.cache; /etc/init.d/pdnsd start`; 
    5657  `/etc/init.d/pdnsd stop; rm -f /var/cache/pdnsd/pdnsd.cache; /etc/init.d/pdnsd start`; 
    5758} 
    58 if (!$mysqlsumar || $mysqlsumar > 150) { 
     59if ((!$mysqlsumar || $mysqlsumar > 150) && !-f "/var/xdrago/log/mysql_restart_running.pid") { 
    5960  `bash /var/xdrago/move_sql.sh`; 
    6061} 
    6162if (!$redissumar && (-f "/etc/init.d/redis-server" || -f "/etc/init.d/redis")) { 
    if (-f "/usr/local/sbin/pure-config.pl") { 
    7778  `/usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf` if (!$ftpsumar); 
    7879} 
    7980if ($mysqlsumar > 0) { 
    80   $resultmysql5 = `/usr/bin/mysqladmin flush-hosts 2>&1`; 
     81  $resultmysql5 = `mysqladmin flush-hosts 2>&1`; 
    8182  print "\n MySQL hosts flushed...\n"; 
    8283} 
    8384if ($dhcpcdlives) { 
    sub global_action 
    119120      } 
    120121    } 
    121122 
     123    if ($PID ne "PID" && $COMMAND =~ /^(\|)/ && $B =~ /^(\\)/ && $TIME =~ /[3-9]:/ && $K =~ /php/ && $X =~ /drush/ && $Z =~ /cron/) 
     124    { 
     125      `kill -9 $PID`; 
     126       $timedate=`date +%y%m%d-%H%M`; 
     127       chomp($timedate); 
     128      `echo "$timedate $K $TIME $STAT $START $X $Y" >> /var/xdrago/log/php-cli.kill.log`; 
     129    } 
     130 
    122131    if ($PID ne "PID" && $COMMAND =~ /^(\\)/ && $TIME =~ /2:/ && $B =~ /php/ && $K =~ /drush/ && $Y =~ /cron/) 
    123132    { 
    124133       $timedate=`date +%y%m%d-%H%M`; 
    125134       chomp($timedate); 
    126       `echo "$timedate $K $TIME $STAT $X $Y" >> /var/xdrago/log/php-cli.watch.log`; 
     135      `echo "$timedate $K $TIME $STAT $START $X $Y" >> /var/xdrago/log/php-cli.watch.log`; 
     136    } 
     137    elsif ($PID ne "PID" && $COMMAND =~ /^(\\)/ && $TIME =~ /[3-9]:/ && $B =~ /php/ && $K =~ /drush/ && $Y =~ /cron/) 
     138    { 
     139      `kill -9 $PID`; 
     140       $timedate=`date +%y%m%d-%H%M`; 
     141       chomp($timedate); 
     142      `echo "$timedate $K $TIME $STAT $START $X $Y" >> /var/xdrago/log/php-cli.kill.log`; 
    127143    } 
    128     elsif ($PID ne "PID" && $COMMAND =~ /^(\\)/ && $TIME =~ /3:/ && $B =~ /php/ && $K =~ /drush/ && $Y =~ /cron/) 
     144    elsif ($PID ne "PID" && $COMMAND =~ /^(\\)/ && $START =~ /[A-Z]/ && $B =~ /php/) 
    129145    { 
    130146      `kill -9 $PID`; 
    131147       $timedate=`date +%y%m%d-%H%M`; 
    132148       chomp($timedate); 
    133       `echo "$timedate $K $TIME $STAT $X $Y" >> /var/xdrago/log/php-cli.kill.log`; 
     149      `echo "$timedate $K $TIME $STAT $START $X $Y" >> /var/xdrago/log/php-cli.kill.log`; 
    134150    } 
    135151 
    136     if ($PID ne "PID" && $USER =~ /(tomcat|jetty)/ && $COMMAND =~ /java/ && ($TIME !~ /^[0-1]{1}:/ || ($TIME !~ /^0:/ && $CPU > 10))) 
     152    if ($PID ne "PID" && $USER =~ /(tomcat|jetty)/ && $COMMAND =~ /java/ && ($STAT =~ /R/ || $TIME !~ /^[0-5]{1}:/)) 
    137153    { 
    138154      `kill -9 $PID`; 
    139155       $timedate=`date +%y%m%d-%H%M`; 
    140156       chomp($timedate); 
    141       `echo "$timedate $TIME $CPU $MEM $STAT $USER" >> /var/xdrago/log/tomcat-jetty-java.kill.log`; 
     157      `echo "$timedate $TIME $CPU $MEM $STAT $START $USER" >> /var/xdrago/log/tomcat-jetty-java.kill.log`; 
    142158    } 
    143159 
    144160    if ($PID ne "PID" && $COMMAND !~ /^(\\)/ && $COMMAND !~ /^(\|)/) 
    sub global_action 
    161177    } 
    162178  } 
    163179} 
     180############################################################################# 
     181sub mysqld_action 
     182{ 
     183  local($PROCS) = `grep -c processor /proc/cpuinfo`; 
     184  chomp($PROCS); 
     185  $MAXCPU = $PROCS."00"; 
     186  if ($PROCS > 4) 
     187  { 
     188    $MAXCPU = 400; 
     189  } 
     190  $MAXCPU = $MAXCPU - 50; 
     191  local(@SQLARR) = `top -n 1 | grep mysqld 2>&1`; 
     192  foreach $line (@SQLARR) { 
     193    if ($line !~ /mysqld_safe/) 
     194    { 
     195      local($NONE, $PID, $USER, $PR, $NI, $VIRT, $RES, $SHR, $S, $CPU, $MEM, $TIME, $COMMAND) = split(/\s+/,$line); 
     196      if (!-f "/var/xdrago/log/mysql_restart_running.pid" && !-f "/var/run/boa_wait.pid") { 
     197        if ($USER =~ /mysql/ && $COMMAND =~ /mysqld/) 
     198        { 
     199          if ($CPU > $MAXCPU) 
     200          { 
     201            `bash /var/xdrago/move_sql.sh`; 
     202            $timedate=`date +%y%m%d-%H%M`; 
     203            chomp($timedate); 
     204            `echo $timedate >> /var/xdrago/log/mysql.forced.restart.log`; 
     205            print "B LINE is $line"; 
     206          } 
     207          else { 
     208            print "C LINE is $line"; 
     209          } 
     210        } 
     211      } 
     212    } 
     213  } 
     214} 
    164215###EOF2013### 
  • aegir/tools/system/second.sh

    diff --git a/aegir/tools/system/second.sh b/aegir/tools/system/second.sh
    index 8dcb2e1..271345b 100755
    a b control() 
    4040{ 
    4141ONEX_LOAD=`awk '{print $1*100}' /proc/loadavg` 
    4242FIVX_LOAD=`awk '{print $2*100}' /proc/loadavg` 
    43 CTL_ONEX_SPIDER_LOAD=500 
    44 CTL_FIVX_SPIDER_LOAD=500 
     43CTL_ONEX_SPIDER_LOAD=388 
     44CTL_FIVX_SPIDER_LOAD=388 
    4545CTL_ONEX_LOAD=1444 
    4646CTL_FIVX_LOAD=888 
    4747CTL_ONEX_LOAD_CRIT=1888 
  • aegir/tools/system/usage.sh

    diff --git a/aegir/tools/system/usage.sh b/aegir/tools/system/usage.sh
    index e0f03c8..f76c77f 100755
    a b PATH=/usr/local/sbin:/usr/local/bin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
    2525### 
    2626_PERMISSIONS=YES 
    2727_MODULES=YES 
    28 _MODULES_ON_SEVEN="syslog robotstxt entitycache" 
    29 _MODULES_ON_SIX="syslog path_alias_cache robotstxt" 
    30 _MODULES_OFF_SEVEN="dblog l10n_update devel performance" 
    31 _MODULES_OFF_SIX="cache dblog l10n_update devel performance poormanscron supercron css_gzip javascript_aggregator cookie_cache_bypass" 
     28_MODULES_ON_SEVEN="robotstxt" 
     29_MODULES_ON_SIX="path_alias_cache robotstxt" 
     30_MODULES_OFF_SEVEN="syslog dblog l10n_update devel performance" 
     31_MODULES_OFF_LESS_SEVEN="syslog dblog l10n_update performance devel" 
     32_MODULES_OFF_SIX="syslog cache dblog l10n_update poormanscron supercron css_gzip javascript_aggregator cookie_cache_bypass devel performance" 
    3233 
    3334 
    3435###-------------SYSTEM-----------------### 
    if [ "$_MODULES" = "YES" ] ; then 
    189190        su -s /bin/bash $_THIS_HM_USER -c "drush en $_MODULES_ON_SIX -y &> /dev/null" 
    190191        su -s /bin/bash $_THIS_HM_USER -c "drush sqlq \"UPDATE system SET weight = '-1' WHERE type = 'module' AND name = 'path_alias_cache'\" &> /dev/null" 
    191192      elif [ -e "$Plr/modules/o_contrib_seven" ] ; then 
    192         su -s /bin/bash $_THIS_HM_USER -c "drush dis $_MODULES_OFF_SEVEN -y &> /dev/null" 
     193        if [ -e "$Plr/profiles/panopoly" ] || [ -e "$Plr/profiles/martplug" ] ; then 
     194          su -s /bin/bash $_THIS_HM_USER -c "drush dis $_MODULES_OFF_LESS_SEVEN -y &> /dev/null" 
     195        else 
     196          su -s /bin/bash $_THIS_HM_USER -c "drush dis $_MODULES_OFF_SEVEN -y &> /dev/null" 
     197        fi 
     198        if [ ! -e "$Plr/sites/all/modules/entitycache_dont_enable.info" ] ; then 
     199          su -s /bin/bash $_THIS_HM_USER -c "drush en entitycache -y &> /dev/null" 
     200        fi 
    193201        su -s /bin/bash $_THIS_HM_USER -c "drush en $_MODULES_ON_SEVEN -y &> /dev/null" 
    194202      fi 
    195203    fi 
    if [ "$_PERMISSIONS" = "YES" ] ; then 
    220228  esac 
    221229  ### modules,themes,libraries - platform level 
    222230  if [ ! -f "$Plr/sites/all/permissions-fix-$_NOW.info" ] ; then 
    223     chown $_THIS_HM_USER:users $Plr/sites/all/{modules,themes,libraries} &> /dev/null 
     231    mkdir -p $Plr/sites/all/{modules,themes,libraries} 
    224232    chown -R $_THIS_HM_USER.ftp:users $Plr/sites/all/{modules,themes,libraries}/* &> /dev/null 
     233    chown $_THIS_HM_USER:users $Plr/drushrc.php $Plr/sites $Plr/sites/all $Plr/sites/all/{modules,themes,libraries} &> /dev/null 
    225234    find $Plr/sites/all/{modules,themes,libraries} -type d -exec chmod 02775 {} \; &> /dev/null 
    226235    find $Plr/sites/all/{modules,themes,libraries} -type f -exec chmod 0664 {} \; &> /dev/null 
    227236    ### known exceptions 
    if [ "$_PERMISSIONS" = "YES" ] ; then 
    231240    echo fixed > $Plr/sites/all/permissions-fix-$_NOW.info 
    232241  fi 
    233242  ### modules,themes,libraries - site level 
    234   chown $_THIS_HM_USER:users $Dir/{modules,themes,libraries} &> /dev/null 
    235243  chown -R $_THIS_HM_USER.ftp:users $Dir/{modules,themes,libraries}/* &> /dev/null 
     244  chown $_THIS_HM_USER:users $Dir/drushrc.php $Dir/{modules,themes,libraries} &> /dev/null 
    236245  find $Dir/{modules,themes,libraries} -type d -exec chmod 02775 {} \; &> /dev/null 
    237246  find $Dir/{modules,themes,libraries} -type f -exec chmod 0664 {} \; &> /dev/null 
    238247  ### files - site level 
    else 
    532541  action >/var/xdrago/log/usage/usage-$_NOW.log 2>&1 
    533542fi 
    534543# 
     544echo "INFO: Removing old permissions-fix-* files..." 
    535545find /data/disk/*/distro/*/*/sites/all/permissions-fix-* -mtime +1 -type f -exec rm -rf {} \; 
    536546find /data/disk/*/static/*/sites/all/permissions-fix-* -mtime +1 -type f -exec rm -rf {} \; 
    537547find /data/disk/*/static/*/*/sites/all/permissions-fix-* -mtime +1 -type f -exec rm -rf {} \; 
    find /data/disk/*/static/*/*/*/sites/all/permissions-fix-* -mtime +1 -type f -ex 
    540550###--------------------### 
    541551echo "INFO: Checking BARRACUDA version..." 
    542552cd /opt/tmp 
    543 wget -q -U iCab http://drupalcode.org/project/barracuda.git/blob_plain/HEAD:/aegir/conf/version.txt 
    544 if [ -e "/opt/tmp/version.txt" ] ; then 
    545   _INSTALLER_VERSION=`cat /opt/tmp/version.txt` 
    546   _VERSIONS_TEST=`cat /var/aegir/config/includes/barracuda_log.txt` 
     553wget -q -U iCab http://drupalcode.org/project/barracuda.git/blob_plain/HEAD:/aegir/conf/barracuda-version.txt 
     554if [ -e "/opt/tmp/barracuda-version.txt" ] ; then 
     555  _INSTALLER_VERSION=`cat /opt/tmp/barracuda-version.txt` 
     556  _VERSIONS_TEST=`cat /var/log/barracuda_log.txt` 
    547557  if [[ "$_VERSIONS_TEST" =~ "$_INSTALLER_VERSION" ]] ; then 
    548558    _VERSIONS_TEST_RESULT=OK 
    549559    echo "INFO: Version test result: OK" 
    EOF 
    564574  echo "INFO: Update notice sent: OK" 
    565575  fi 
    566576fi 
     577# 
     578if [ ! -f "/data/all/permissions-fix-$_INSTALLER_VERSION.info" ] ; then 
     579  echo "INFO: Fixing permissions in the /data/all tree..." 
     580  chmod 02775 /data/all/*/*/sites/all/{modules,libraries,themes} &> /dev/null 
     581  chown -R root:root /data/all 
     582  chown -R root:users /data/all/*/*/sites 
     583  echo fixed > /data/all/permissions-fix-$_INSTALLER_VERSION.info 
     584fi 
    567585###EOF2013### 
  • deleted file egir/tools/usr/add_ftp_user_standard.sh.txt

    diff --git a/aegir/tools/usr/add_ftp_user_standard.sh.txt b/aegir/tools/usr/add_ftp_user_standard.sh.txt
    deleted file mode 100755
    index cc6edf5..0000000
    + -  
    1 #!/bin/bash 
    2  
    3  
    4 ###----------------------------### 
    5 ##  Add ftp only user to site   ## 
    6 ###----------------------------### 
    7  
    8 ### Config 
    9 _ADMIN=admin 
    10 _USER=user 
    11 _SITE=domain 
    12 _SITE_DIR="/path/to/platform/sites/$_SITE" 
    13  
    14 ### Create user 
    15 _USERFTP="$_USER.ftp" 
    16 _USERFTP_ROOT="/home/$_USERFTP" 
    17 _TMP="/var/tmp" 
    18 _WEBG=www-data 
    19 _USRG=users 
    20 if [ ! -d $_USERFTP_ROOT ] ; then 
    21   useradd -d /home/$_USERFTP -s /bin/false -m -N -r $_USERFTP 
    22   adduser $_USERFTP $_WEBG 
    23   cd $_TMP 
    24   touch $_TMP/$_USERFTP.txt 
    25   chmod 0600 $_TMP/$_USERFTP.txt 
    26   pwgen -v -s -1 > $_TMP/$_USERFTP.txt 
    27   ph=$(makepasswd --clearfrom=$_TMP/$_USERFTP.txt --crypt-md5 |awk '{print $2}') 
    28   usermod -p $ph $_USERFTP 
    29 fi 
    30 PXSWD=`cat $_TMP/$_USERFTP.txt` 
    31 PASWD=`echo -n $PXSWD | tr -d "\n"` 
    32 cd /home/$_USERFTP; ln -s $_SITE_DIR $_SITE 
    33 cd 
    34 mkdir -p /home/$_ADMIN/ftp.users 
    35 echo "$_USERFTP:$PASWD" >> /home/$_ADMIN/ftp.users/$_SITE 
  • deleted file egir/tools/usr/add_lshell_user_master.sh.txt

    diff --git a/aegir/tools/usr/add_lshell_user_master.sh.txt b/aegir/tools/usr/add_lshell_user_master.sh.txt
    deleted file mode 100755
    index 3fba953..0000000
    + -  
    1 #!/bin/bash 
    2  
    3  
    4 ###----------------------------### 
    5 ##  Add ftps/ssh master user    ## 
    6 ###----------------------------### 
    7  
    8 ### Config 
    9 _ADMIN=admin 
    10 _USER=user 
    11 _SITE=domain 
    12 _SITE_DIR="/path/to/platform/sites/$_SITE" 
    13  
    14 ### Create user 
    15 _USERFTP="$_USER.ftp" 
    16 _USERFTP_ROOT="/home/$_USERFTP" 
    17 _TMP="/var/tmp" 
    18 _WEBG=www-data 
    19 _USRG=users 
    20 if [ ! -d $_USERFTP_ROOT ] ; then 
    21   useradd -d /home/$_USERFTP -s /usr/bin/lshell -m -N -r $_USERFTP 
    22   adduser $_USERFTP $_WEBG 
    23   cd $_TMP 
    24   touch $_TMP/$_USERFTP.txt 
    25   chmod 0600 $_TMP/$_USERFTP.txt 
    26   pwgen -v -s -1 > $_TMP/$_USERFTP.txt 
    27   ph=$(makepasswd --clearfrom=$_TMP/$_USERFTP.txt --crypt-md5 |awk '{print $2}') 
    28   usermod -p $ph $_USERFTP 
    29   passwd -w 7 -x 90 $_USERFTP 
    30   usermod -aG lshellg $_USERFTP 
    31 fi 
    32 PXSWD=`cat $_TMP/$_USERFTP.txt` 
    33 PASWD=`echo -n $PXSWD | tr -d "\n"` 
    34 chsh -s /usr/bin/lshell $_USERFTP 
    35 echo " " >> /etc/lshell.conf 
    36 echo "[$_USERFTP]" >> /etc/lshell.conf 
    37 echo "path : ['/data/disk/$_USER/distro', '/data/disk/$_USER/static', '/data/disk/$_USER/backups']" >> /etc/lshell.conf 
    38 cd /home/$_USERFTP; ln -s $_SITE_DIR $_SITE 
    39 cd 
    40 mkdir -p /home/$_ADMIN/ftp.users 
    41 echo "$_USERFTP:$PASWD" >> /home/$_ADMIN/ftp.users/$_SITE 
  • deleted file egir/tools/usr/add_lshell_user_standard.sh.txt

    diff --git a/aegir/tools/usr/add_lshell_user_standard.sh.txt b/aegir/tools/usr/add_lshell_user_standard.sh.txt
    deleted file mode 100755
    index 2a40ac6..0000000
    + -  
    1 #!/bin/bash 
    2  
    3  
    4 ###----------------------------### 
    5 ##  Add ftps/ssh user to site   ## 
    6 ###----------------------------### 
    7  
    8 ### Config 
    9 _ADMIN=admin 
    10 _USER=user 
    11 _SITE=domain 
    12 _SITE_DIR="/path/to/platform/sites/$_SITE" 
    13  
    14 ### Create user 
    15 _USERFTP="$_USER.ftp" 
    16 _USERFTP_ROOT="/home/$_USERFTP" 
    17 _TMP="/var/tmp" 
    18 _WEBG=www-data 
    19 _USRG=users 
    20 if [ ! -d $_USERFTP_ROOT ] ; then 
    21   useradd -d /home/$_USERFTP -s /usr/bin/lshell -m -N -r $_USERFTP 
    22   adduser $_USERFTP $_WEBG 
    23   cd $_TMP 
    24   touch $_TMP/$_USERFTP.txt 
    25   chmod 0600 $_TMP/$_USERFTP.txt 
    26   pwgen -v -s -1 > $_TMP/$_USERFTP.txt 
    27   ph=$(makepasswd --clearfrom=$_TMP/$_USERFTP.txt --crypt-md5 |awk '{print $2}') 
    28   usermod -p $ph $_USERFTP 
    29   passwd -w 7 -x 90 $_USERFTP 
    30   usermod -aG lshellg $_USERFTP 
    31 fi 
    32 PXSWD=`cat $_TMP/$_USERFTP.txt` 
    33 PASWD=`echo -n $PXSWD | tr -d "\n"` 
    34 chsh -s /usr/bin/lshell $_USERFTP 
    35 echo " " >> /etc/lshell.conf 
    36 echo "[$_USERFTP]" >> /etc/lshell.conf 
    37 echo "path : ['$_SITE_DIR']" >> /etc/lshell.conf 
    38 cd /home/$_USERFTP; ln -s $_SITE_DIR $_SITE 
    39 cd 
    40 mkdir -p /home/$_ADMIN/ftp.users 
    41 echo "$_USERFTP:$PASWD" >> /home/$_ADMIN/ftp.users/$_SITE 
  • new file docs/BLOWFISH.txt

    diff --git a/docs/BLOWFISH.txt b/docs/BLOWFISH.txt
    new file mode 100644
    index 0000000..d10b71b
    - +  
     1 
     2---------- 
     3SHA512 
     4---------- 
     5Your Debian or Ubuntu system uses SHA512 for passwords encryption by default. 
     6 
     7This is not bad, and for sure much better than MD5 by default used in BOA for 
     8all newly created SSH/FTPS accounts (both main and extra - for Aegir Clients) 
     9in all releases up to BOA-2.0.8 
     10 
     11But since BOA forces all users to update their passwords every 90 days, once 
     12the user updates his password, it is automatically encrypted with SHA512, 
     13so it no longer uses the completely insecure MD5 hashing. 
     14 
     15Note that BOA switched to SHA512 instead of MD5 by default in HEAD after 
     16BOA-2.0.8 Edition, and will use SHA512 by default starting with BOA-2.0.9 
     17 
     18---------- 
     19WARNING! 
     20---------- 
     211. Make sure you have working SSH keys for direct root access without sudo. 
     222. Make sure you have working SSH keys for direct root access without sudo. 
     233. Make sure you have working SSH keys for direct root access without sudo. 
     24 
     25REALLY. Don't even read anything below, if you didn't set this up yet! 
     26        You could lock yourself out of your server forever (almost), 
     27        if your only access is password based and something will go wrong, 
     28        because you didn't read and follow this how-to *precisely*. 
     29        If you are interested why it is so important, read the explanation 
     30        further below. 
     31 
     32---------- 
     33BLOWFISH 
     34---------- 
     35You can easily switch your system to use much more secure Bcrypt/Blowfish, 
     36using the simple steps listed below. 
     37 
     38$ apt-get install libpam-unix2 -y 
     39 
     40$ cp -af /usr/share/pam-configs/unix /usr/share/pam-configs/unix2 
     41$ sed -i "s/^Name: Unix/Name: Unix2/g"  /usr/share/pam-configs/unix2 
     42$ sed -i "s/pam_unix.so/pam_unix2.so/g" /usr/share/pam-configs/unix2 
     43$ sed -i "s/nullok_secure//g"           /usr/share/pam-configs/unix2 
     44$ sed -i "s/obscure//g"                 /usr/share/pam-configs/unix2 
     45$ sed -i "s/sha512//g"                  /usr/share/pam-configs/unix2 
     46$ sed -i "s/rounds//g"                  /usr/share/pam-configs/unix2 
     47$ sed -i "s/pam_unix.so/pam_unix2.so/g" /etc/pam.d/pure-ftpd 
     48$ sed -i "s/^CRYPT=des.*/CRYPT=blowfish/g" /etc/security/pam_unix2.default 
     49$ sed -i "s/^BLOWFISH_CRYPT_FILES=.*/BLOWFISH_CRYPT_FILES=8/g" /etc/security/pam_unix2.default 
     50 
     51$ pam-auth-update 
     52 
     53  [*] Unix2 authentication 
     54  [*] Unix authentication 
     55 
     56In the displayed dialog box please enable "Unix2 authentication" and *DO NOT* 
     57disable "Unix authentication". Both should be enabled, or all existing SHA512 
     58passwords, including your root password, will stop working! 
     59 
     60You should use Arrow keys, then choose <Ok> with Tab and hit Enter to confirm. 
     61 
     62---------- 
     63TESTING 
     64---------- 
     65Now update your root password and any other account password for testing 
     66with standard `passwd` command. Even if you have disabled password based 
     67root access, you should still keep the password working, because you will 
     68still need it when accessing the system via remote console, if available. 
     69 
     70You will notice in the /etc/shadow file that instead of lines similar to: 
     71 
     72o1.ftp:$1$XVn3/oPw$Me6EZMC2A4/qAayQGRCh2/:15801::90:7::: 
     73=== if $1$ then it is *insecure* MD5 === 
     74 
     75o1.ftp:$6$N52KMMFm$m/CB/sQtgREx1TtlHNy7aBHUxUQMx6r3q8O39FDTbt6Etzfi2ZYqR/AjUWtRWHmz3IPjZQW8xtXJjwbee9dFk0:15822::90:7::: 
     76=== if $6$ then it is better SHA512 === 
     77 
     78Now it looks similar to: 
     79 
     80o1.ftp:$2a$08$EeO3oNMsWxqtvCdWrZfeNeQhwxI0MxqJEDjvRqjZ1Cvc5Yu8XbTlK:15822::90:7::: 
     81=== if $2a$ $08$ then it is the best Bcrypt/Blowfish with 8 work-factor === 
     82 
     83Test if the updated password for o1.ftp allows you to log in via SSH and FTPS. 
     84 
     85Done! 
     86 
     87---------- 
     88IMPORTANT! 
     89---------- 
     90Only MD5 passwords would still work after enabling "Unix2 authentication" 
     91and disabling "Unix authentication", as it is recommended in many how-tos 
     92you can find on the net. Their authors even share horrible stories where 
     93they managed to lock the access completely and were forced to boot the system 
     94from rescue CD etc. because they didn't fully realize what they are doing. 
     95 
     96The problem is that both root password and any other account password, 
     97once updated after initial setup with MD5 used in BOA for non-root accounts 
     98previously, will use SHA512, which simply doesn't work when you have disabled 
     99"Unix authentication" and enabled only "Unix2 authentication". 
     100 
     101Make sure that you have enabled both! 
     102 
     103Note that BOA will still use SHA512 for all new or updated automatically 
     104extra accounts, but since it still forces you to update passwords every 
     10590 days, all accounts on your system will use Bcrypt/Blowfish as soon as 
     106their passwords are updated with standard `passwd` command, after you have 
     107added Bcrypt/Blowfish support using the how-to above. 
     108 
     109---------- 
     110REFERENCES 
     111---------- 
     112http://arstechnica.com/security/2013/04/why-livingsocials-50-million-password-breach-is-graver-than-you-may-think/ 
     113http://arstechnica.com/security/2012/08/passwords-under-assault/ 
     114http://codahale.com/how-to-safely-store-a-password/ 
     115http://yorickpeterse.com/articles/use-bcrypt-fool/ 
     116http://wildlyinaccurate.com/bcrypt-choosing-a-work-factor 
     117https://gist.github.com/jkmickelson/3660219 
     118http://drupal.org/node/1201444#comment-6448638 
     119http://drupal.org/project/phpass 
     120http://www.php.net/manual/en/function.crypt.php 
     121http://www.php.net/security/crypt_blowfish.php 
  • docs/NOTES.txt

    diff --git a/docs/NOTES.txt b/docs/NOTES.txt
    index 9928b39..ed3aa18 100644
    a b  
    11 
     2# Notes related to Barracuda add-ons configurable via _XTRAS_LIST variable. 
     3 
     4  * Configuration file location: /root/.barracuda.cnf 
     5 
     6    ### 
     7    ### Xtras included with "ALL" wildcard: 
     8    ### 
     9    ### CGP --- Collectd Graph Panel 
     10    ### CHV --- Chive DB Manager 
     11    ### CSF --- Firewall 
     12    ### CSS --- Compass Tools 
     13    ### FTP --- Pure-FTPd server with forced FTPS 
     14    ### PDS --- Fast DNS Cache Server (pdnsd) 
     15    ### WMN --- Webmin Control Panel 
     16    ### 
     17    ### Xtras which need to be listed explicitly: 
     18    ### 
     19    ### BDD --- SQL Buddy DB Manager 
     20    ### BND --- Bind9 DNS Server 
     21    ### FMG --- FFmpeg support 
     22    ### GIT --- Latest Git from sources 
     23    ### SR1 --- Apache Solr 1 with Jetty 7 
     24    ### SR3 --- Apache Solr 3 with Jetty 8 
     25    ### SR4 --- Apache Solr 4 with Jetty 8 or 9 
     26    ### 
     27    ### Examples: 
     28    ### 
     29    ### _XTRAS_LIST="" 
     30    ### _XTRAS_LIST="ALL" 
     31    ### _XTRAS_LIST="ALL GIT SR3" 
     32    ### _XTRAS_LIST="PDS CSF CGP CHV FTP" 
     33    ### 
     34 
     35  * Configuration file template: docs/cnf/barracuda.cnf 
     36 
     37 
    238# Notes related to Barracuda install on public server with or w/o _EASY_PUBLIC option 
    339 
    440  NOTE: 123.45.67.89 below is a placeholder for your server public, real IP address. 
     
    5894        it further on upgrade, by editing various settings stored in the BOA config 
    5995        files, respectively: 
    6096 
    61         /root/.barracuda.cnf 
    62         /root/.o1.octopus.cnf 
    63         /root/.o2.octopus.cnf 
     97        /root/.barracuda.cnf  - check docs/cnf/barracuda.cnf template 
     98        /root/.o1.octopus.cnf - check docs/cnf/octopus.cnf template 
     99        /root/.o2.octopus.cnf - check docs/cnf/octopus.cnf template 
    64100        etc. 
    65101 
    66102        It may be useful when you prefer to install Percona instead of MariaDB 
    67103        or to always use latest version of PHP built from sources etc. 
     104 
    68105        Please read docs/UPGRADE.txt for simple upgrades how-to. 
    69106 
  • new file docs/PLATFORMS.txt

    diff --git a/docs/PLATFORMS.txt b/docs/PLATFORMS.txt
    new file mode 100644
    index 0000000..7833a48
    - +  
     1###----------------------------------------### 
     2### PLATFORMS INSTALL MODE                 ### 
     3###----------------------------------------### 
     4### 
     5### You can use wildcard "ALL" to install all 
     6### available platforms or configure the list 
     7### of platforms to be installed as explained 
     8### below. 
     9### 
     10### Note: the "ALL" wildcard is not default! 
     11### 
     12### When combined with _AUTOPILOT=YES option 
     13### you can speed up the process and still 
     14### control which platforms will be installed, 
     15### using the symbols listed below. 
     16### 
     17### D8D ----------- Drupal 8 dev-tested (off) 
     18### D8E ----------- Drupal 8 dev-edge (off) 
     19### D7P D7S D7D --- Drupal 7 prod/stage/dev 
     20### D6P D6S D6D --- Pressflow 6 p/s/d 
     21### D5P ----------- Pressflow 5 (off) 
     22### AQ6 ----------- Acquia D6 
     23### CC3 ----------- CiviCRM 3.4.8 D6 (off) 
     24### CM6 ----------- CiviCRM 4.1.6 D6 
     25### CM7 ----------- CiviCRM 4.2.8 D7 
     26### CME ----------- Commerce v.2 
     27### COD ----------- Conference 
     28### CS7 ----------- Commons 7 
     29### DCE ----------- Commerce v.1 
     30### DCS ----------- Commons 6 
     31### ELS ----------- ELMS (off) 
     32### FSR ----------- Feature Server 
     33### MNS ----------- Managing News 
     34### MPG ----------- MartPlug (off) 
     35### NS7 ----------- NodeStream D7 
     36### NSM ----------- NodeStream D6 (off) 
     37### OAM ----------- Open Atrium 
     38### OAY ----------- Open Academy (off) 
     39### OCH ----------- OpenChurch 
     40### ODS ----------- Open Deals 
     41### OEE ----------- Open Enterprise (off) 
     42### OOH ----------- Open Outreach 
     43### OPC ----------- OpenPublic (off) 
     44### OPH ----------- OpenPublish 
     45### OSR ----------- OpenScholar (off) 
     46### OVO ----------- Octopus Video (off) 
     47### PPT ----------- ProsePoint 
     48### PPY ----------- Panopoly 
     49### UC7 ----------- Ubercart D7 
     50### UCT ----------- Ubercart D6 
     51### VOA ----------- Videola (off) 
     52### 
     53### Examples: 
     54### 
     55### _PLATFORMS_LIST=ALL 
     56### _PLATFORMS_LIST="D7P D6P OAM MNS NS7 OOH" 
     57### 
     58_PLATFORMS_LIST="D7P D7S D7D D6P D6S D6D OAM" 
     59 
     60 
     61###----------------------------------------### 
     62### UNSUPPORTED (off) DISTROS INSTALL      ### 
     63###----------------------------------------### 
     64### 
     65### If you wish to install also distros listed 
     66### above as (off), change the option below 
     67### to: _ALLOW_UNSUPPORTED=YES 
     68### 
     69_ALLOW_UNSUPPORTED=NO 
  • docs/SOLR.txt

    diff --git a/docs/SOLR.txt b/docs/SOLR.txt
    index 6ab1eae..c7fc34b 100644
    a b  
    4040 
    4141 Solr port ........: 8077 (for Solr 1.x with Jetty 7) 
    4242 Solr port ........: 8088 (for Solr 3.x with Jetty 8) 
    43  Solr port ........: 8099 (for Solr 4.x with Jetty 8 or 9 on Precise) 
     43 Solr port ........: 8099 (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy) 
    4444 Solr port ........: 8080 (for Solr 1.x with Jetty 7 migrated from Tomcat) 
    4545 
    4646 Solr path ........: solr/core0 (configured in solr.xml) 
     
    6363 2. Add this new core in the solr.xml file: 
    6464    /opt/solr1/solr.xml (for Solr 1.x with Jetty 7) 
    6565    /opt/solr3/solr.xml (for Solr 3.x with Jetty 8) 
    66     /opt/solr4/solr.xml (for Solr 4.x with Jetty 8 or 9 on Precise) 
     66    /opt/solr4/solr.xml (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy) 
    6767 
    6868 3. Restart correct Jetty instance: 
    6969    service jetty7 restart (for Solr 1.x with Jetty 7) 
    7070    service jetty8 restart (for Solr 3.x with Jetty 8) 
    71     service jetty9 restart (for Solr 4.x with Jetty 8 or 9 on Precise) 
     71    service jetty9 restart (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy) 
    7272 
    7373 You can also rename the "core name" in the file: 
    7474   /opt/solr{1,3,4}/solr.xml 
     
    8585 
    8686 SR1 (for Solr 1.x with Jetty 7) 
    8787 SR3 (for Solr 3.x with Jetty 8) 
    88  SR4 (for Solr 4.x with Jetty 8 or 9 on Precise) 
     88 SR4 (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy) 
    8989 
    9090 It is even possible to add them *all* on upgrade when 
    9191 you are already running now deprecated Tomcat 6 with Solr 1.x, 
  • docs/SSL.txt

    diff --git a/docs/SSL.txt b/docs/SSL.txt
    index 3c0ebf9..4557de1 100644
    a b server { 
    3434  location / { 
    3535    proxy_pass                 http://extra_ip; 
    3636    proxy_redirect             off; 
     37    gzip_vary                  off; 
    3738    proxy_set_header           Host              $host; 
    3839    proxy_set_header           X-Real-IP         $remote_addr; 
    3940    proxy_set_header           X-Forwarded-By    $server_addr:$server_port; 
    server { 
    9596  location / { 
    9697    proxy_pass                 http://extra_ip_ssl; 
    9798    proxy_redirect             off; 
     99    gzip_vary                  off; 
    98100    proxy_set_header           Host              $host; 
    99101    proxy_set_header           X-Real-IP         $remote_addr; 
    100102    proxy_set_header           X-Forwarded-By    $server_addr:$server_port; 
    server { 
    143145  location / { 
    144146    proxy_pass                 http://extra_ip_ssl; 
    145147    proxy_redirect             off; 
     148    gzip_vary                  off; 
    146149    proxy_set_header           Host              $host; 
    147150    proxy_set_header           X-Real-IP         $remote_addr; 
    148151    proxy_set_header           X-Forwarded-By    $server_addr:$server_port; 
  • docs/UPGRADE.txt

    diff --git a/docs/UPGRADE.txt b/docs/UPGRADE.txt
    index 5552cdd..c837ef8 100644
    a b $ octopus up-head all 
    5353          $ barracuda up-stable log 
    5454          $ octopus up-stable all log 
    5555 
    56           Note also that detailed backend log on barracuda 
    57           upgrade is always stored directly in /var/backups/* 
     56          Detailed backend log on barracuda upgrade is always stored in 
     57          /var/backups/* 
     58 
     59### NOTE: You can append "system" as a last argument to the barracuda 
     60          command, and it will upgrade only the system, without running 
     61          Aegir Master Instance upgrade, plus it will write the output 
     62          to the file instead of to the console: 
     63          /var/backups/reports/up/barracuda/* 
     64 
     65          Example: 
     66 
     67          $ barracuda up-stable system 
     68 
     69### NOTE: While both "log" and "system" modes are "silent", because 
     70          they don't display anything in your console, they will send 
     71          the log via e-mail to your address specified in the file: 
     72          /root/.barracuda.cnf 
     73 
     74          It is recommended that you start `screen` before running 
     75          commands using the "silent" mode - to avoid confusion 
     76          or incomplete tasks when your SSH connection drops. 
    5877 
    5978### NOTE: It is possible to set/force the upgrade mode on the fly 
    6079          using optional arguments: {aegir|platforms|both} 
    $ octopus up-head all 
    6382          honor also settings from the octopus instance cnf file, 
    6483          where currently only "aegir" mode is defined 
    6584          with _HM_ONLY=YES option. 
    66            
     85 
    6786          Examples: 
    6887 
    6988          $ octopus up-stable o1 aegir 
  • new file docs/cnf/barracuda.cnf

    diff --git a/docs/cnf/barracuda.cnf b/docs/cnf/barracuda.cnf
    new file mode 100644
    index 0000000..bd92367
    - +  
     1### 
     2### Barracuda version BOA-2.0.8 
     3### 
     4### Configuration stored in the /root/.barracuda.cnf file. 
     5### This example is for public install mode - see docs/INSTALL.txt 
     6### 
     7### NOTE: the group of settings displayed bellow will *not* be overriden 
     8### on upgrade by the Barracuda script nor by this configuration file. 
     9### They can be defined only on initial Barracuda install. 
     10### 
     11_HTTP_WILDCARD=YES #------------ Listen on single IP instead of all IPs when NO 
     12_MY_OWNIP="123.45.67.89" #------ Allows to specify web server IP if not default 
     13_MY_HOSTN="f-q-d-n" #----------- Allows to define server hostname 
     14_EASY_HOSTNAME="f-q-d-n" #------ Hostname auto-configured via _EASY_PUBLIC 
     15_MY_FRONT="master.f-q-d-n" #---- URL of the Aegir Master Instance control panel 
     16_THIS_DB_HOST=localhost #------- Allows to use hostname in DB grants when FQDN 
     17_SMTP_RELAY_TEST=YES #---------- Allows to skip SMTP availability tests when NO 
     18_SMTP_RELAY_HOST="" #----------- Allows to configure simple SMTP relay (w/o pwd) 
     19_LOCAL_NETWORK_IP="" #---------- Web server IP if in localhost mode - auto-conf 
     20_LOCAL_NETWORK_HN="" #---------- Hostname if in localhost mode - auto-conf 
     21### 
     22### NOTE: the group of settings displayed bellow 
     23### will *override* all listed settings in the Barracuda script, 
     24### both on initial install and upgrade. 
     25### 
     26_MY_EMAIL="my@email" #---------- System admin e-mail 
     27_XTRAS_LIST="" #---------------- See docs/NOTES.txt for details on add-ons 
     28_AUTOPILOT=NO #----------------- Allows to skip all Yes/No questions when YES 
     29_SYSTEM_UPGRADE_ONLY=NO #------- Allows to skip Aegir on upgrade (deprecated) 
     30_DEBUG_MODE=NO #---------------- Allows to enable Drush debugging when YES 
     31_DB_SERVER=MariaDB #------------ Allows to install MariaDB or Percona DB server 
     32_DB_BINARY_LOG=NO #------------- Allows to enable binary logging when YES 
     33_DB_ENGINE=InnoDB #------------- Allows to specify default engine for Drupal 6 
     34_SSH_PORT=22 #------------------ Allows to configure non-standard SSH port 
     35_LOCAL_DEBIAN_MIRROR= #--------- Allows to force non-default Debian mirror 
     36_LOCAL_UBUNTU_MIRROR= #--------- Allows to force non-default Ubuntu mirror 
     37_FORCE_GIT_MIRROR="" #---------- Allows to use different mirror (deprecated) 
     38_DNS_SETUP_TEST=YES #----------- Allows to skip DNS testing when NO 
     39_NGINX_WORKERS=AUTO #----------- Allows to override AUTO with valid number 
     40_NGINX_DOS_LIMIT=300 #---------- Allows to override default 250/300 limit 
     41_BUILD_FROM_SRC=NO #------------ Allows to force PHP build from sources 
     42_PHP_MODERN_ONLY=YES #---------- Allows to install PHP 5.2 when NO 
     43_PHP_FPM_VERSION=5.3 #---------- Allows to define default PHP-FPM version 
     44_PHP_CLI_VERSION=5.3 #---------- Allows to define default PHP-CLI version 
     45_PHP_FPM_WORKERS=AUTO #--------- Allows to override AUTO with valid number 
     46_NGINX_EXTRA_CONF="" #---------- Allows to add custom options to Nginx build 
     47_NGINX_LDAP=NO #---------------- Installs LDAP Nginx support when YES 
     48_PHP_GEOS=NO #------------------ Installs GEOS for PHP when YES - experimental 
     49_PHP_MONGODB=NO #--------------- Installs MONGODB for PHP when YES 
     50_PHP_EXTRA_CONF="" #------------ Allows to add custom options to PHP build 
     51_LOAD_LIMIT_ONE=1444 #---------- Defines max 1 min load before disabling Nginx 
     52_LOAD_LIMIT_TWO=888 #----------- Defines max 5 min load before disabling Nginx 
     53_CUSTOM_CONFIG_CSF=NO #--------- Protects custom CSF config when YES 
     54_CUSTOM_CONFIG_SQL=NO #--------- Protects custom SQL config when YES 
     55_CUSTOM_CONFIG_REDIS=NO #------- Protects custom Redis config when YES 
     56_CUSTOM_CONFIG_PHP_5_2=NO #----- Protects custom PHP 5.2 ini files when YES 
     57_CUSTOM_CONFIG_PHP_5_3=NO #----- Protects custom PHP 5.3 ini files when YES 
     58_SPEED_VALID_MAX=3600 #--------- Defines Speed Booster hourly cache TTL in sec 
     59_USE_MEMCACHED=NO #------------- Installs memcached when YES (deprecated) 
     60_NEWRELIC_KEY= #---------------- Installs New Relic when license key is set 
     61_USE_STOCK=NO #----------------- Allows to install stock Aegir 2.x when YES 
     62_EXTRA_PACKAGES="" #------------ Installs listed extra packages with apt-get 
     63_STRONG_PASSWORDS=NO #---------- Allows to generate secure passwords when YES 
     64### 
     65### Barracuda version BOA-2.0.8 
     66### 
  • new file docs/cnf/octopus.cnf

    diff --git a/docs/cnf/octopus.cnf b/docs/cnf/octopus.cnf
    new file mode 100644
    index 0000000..c13d7b4
    - +  
     1### 
     2### Octopus version BOA-2.0.8 
     3### 
     4### Configuration stored in the /root/.$_USER.octopus.cnf file. 
     5### This example is for public install mode - see docs/INSTALL.txt 
     6### 
     7### NOTE: the group of settings displayed bellow 
     8### will *override* all listed here settings in the Octopus script. 
     9### 
     10_USER="o1" #-------------------- Aegir Instance system account name 
     11_MY_EMAIL="my@email" #---------- Aegir Instance owner e-mail 
     12_PLATFORMS_LIST=ALL #----------- Platforms to install - see docs/PLATFORMS.txt 
     13_ALLOW_UNSUPPORTED=NO #--------- Allows to install deprecated platforms when YES 
     14_AUTOPILOT=NO #----------------- Allows to skip all Yes/No questions when YES 
     15_HM_ONLY=NO #------------------- Allows to upgrade Aegir only (deprecated) 
     16_O_CONTRIB_UP=NO #-------------- Allows to force o_contrib upgrade when YES 
     17_DEBUG_MODE=NO #---------------- Allows to enable Drush debugging when YES 
     18_MY_OWNIP= #-------------------- Allows to specify web server IP if not default 
     19_FORCE_GIT_MIRROR="" #---------- Allows to use different mirror (deprecated) 
     20_THIS_DB_HOST=localhost #------- DB host depends on Barracuda setting (FQDN) 
     21_DNS_SETUP_TEST=YES #----------- Allows to skip DNS testing when NO 
     22_HOT_SAUCE=NO #----------------- Forces new platforms tree on install when YES 
     23_USE_CURRENT=YES #-------------- Forces new platforms tree on upgrade when NO 
     24_REMOTE_CACHE_IP=127.0.0.1 #---- Default IP address where Redis listens 
     25_LOCAL_NETWORK_IP= #------------ Web server IP if in localhost mode - auto-conf 
     26_PHP_FPM_VERSION=5.3 #---------- Defaults to 5.3 because 5.2 is deprecated 
     27_PHP_CLI_VERSION=5.3 #---------- Defaults to 5.3 because 5.2 is deprecated 
     28_USE_STOCK=NO #----------------- Allows to install stock Aegir 2.x when YES 
     29_STRONG_PASSWORDS=NO #---------- Allows to generate secure passwords when YES 
     30### 
     31### NOTE: the group of settings displayed bellow will be *overriden* 
     32### by config files stored in the /data/disk/o1/log/ directory, 
     33### but only on upgrade. 
     34### 
     35_DOMAIN="o1.f-q-d-n" #---------- URL of the Aegir control panel 
     36_CLIENT_EMAIL= #---------------- Create client user if different than _MY_EMAIL 
     37_CLIENT_OPTION="SSD" #---------- Currently not used 
     38_CLIENT_SUBSCR="Y" #------------ Currently not used 
     39_CLIENT_CORES="8" #------------- Currently not used 
     40### 
     41### Octopus version BOA-2.0.8 
     42###