]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Removes install action
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Feb 2017 21:23:39 +0000 (19:23 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Feb 2017 21:23:39 +0000 (19:23 -0200)
files/drupal

index 9783e237554f6166c08d7ec75e295f50b152ab69..b22e893873c602f5d012e03f5e3f45459247aa03 100755 (executable)
@@ -264,115 +264,9 @@ function drupal_make {
   fi
 }
 
-# Install a new instance
-function drupal_install {
-  if [ -z "$2" ]; then
-    echo "Usage: `basename $0` install <series> <name> [aliases]"
-    exit 1
-  fi
-
-  # Required arguments
-  series="$1"
-  site="$2"
-  shift 2
-
-  # Site aliases
-  aliases="$*"
-
-  # Other parameters
-  domain="`facter domain`"
-
-  if [ "$series" != "6" ]; then
-    # Installation parameters
-    drupal_user_input name        "$site"                    "Site name"
-    drupal_user_input site_email  "$site@$domain"            "Site email"
-    drupal_user_input profile     "standard"                 "Installation profile"
-    drupal_user_input locale      "pt-br"                    "Installation language"
-    drupal_user_input admin       "$site"                    "Admin user"
-    drupal_user_input admin_email "$admin@$domain"           "Admin email"
-  fi
-
-  if [ -e "$BASE/drupal-$series/sites/$site" ]; then
-    echo "Drupal $site already installed at $BASE/drupal-$series"
-    echo "Installation will be overwritten"
-  else
-    # Check installation
-    if [ ! -e "$BASE/drupal-$series" ]; then
-      echo "Please download your drupal $series farm first"
-      exit 1
-    fi  
-
-    echo "Creating $SITES/$site/drupal/ structure..."
-    mkdir -p $SITES/$site/drupal/{files,themes,modules,libraries}
-
-    echo "Copying default configuration file..."
-    cp $BASE/drupal-$series/sites/default/default.settings.php $SITES/$site/drupal/settings.php
-    chmod 640 $SITES/$site/drupal/settings.php
-
-    (
-    echo "Creating symlinks..."
-    cd $BASE/drupal-$series/sites
-    ln -s $SITES/$site/drupal $site
-    ln -s $SITES/$site/drupal $site.$domain
-
-    for alias in $aliases; do
-      ln -s $SITES/$site/drupal $alias
-    done
-    )
-
-    # Aditional parameters
-    drupal_user_input dbname      "$site"                    "Database name"
-    drupal_user_input dbuser      "$site"                    "Database user"
-    drupal_user_input dbpasswd    "$site"                    "Database passwd"
-    echo ""
-
-    echo "Configuring settings.php"
-    if [ "$series" == "7" ]; then
-      cat >> $SITES/$site/drupal/settings.php <<-EOF
-\$databases['default']['default'] = array(
-'driver'   => 'mysql',
-'database' => '$dbname',
-'username' => '$dbuser',
-'password' => '$dbpasswd',
-'host'     => 'localhost',
-'prefix'   => '',
-);
-EOF
-    elif [ "$series" == "6" ]; then
-      cat >> $SITES/$site/drupal/settings.php <<-EOF
-\$db_url = 'mysql://$dbuser:$dbpasswd@localhost/$dbname';
-EOF
-    fi
-  fi
-
-  if [ "$series" != "6" ]; then
-    (
-    echo "Installing drupal $series for $site using $profile profile..."
-    cd $BASE/drupal-$series/
-    drush site-install $profile --site-name="$name" --site-mail="$site_email" --locale=$locale \
-      --uri="$site" --sites-subdir="$site" --account-name="$admin" --account-mail="$admin_email"
-    )
-  fi
-
-  # Fix permissions
-  if grep -qe "^$site:" /etc/passwd; then
-    chown drupal.$site $SITES/$site/drupal/settings.php
-    chown $site.$site  $SITES/$site/drupal/{files,themes,modules,libraries}
-  else
-    chown drupal.www-data   $SITES/$site/drupal/settings.php
-    chown www-data.www-data $SITES/$site/drupal/{files,themes,modules,libraries}
-  fi
-
-  if [ "$series" == "6" ]; then
-    echo "Now please access http://$site.$domain/install.php to continue with the installation."
-  else
-    echo "Done. Please check your installation."
-  fi
-}
-
 # Main procedure
 if [ -z "$1" ]; then
-  echo "Usage: `basename $0` <cron|download|update|updatedb|upgrade|run|make|install> [arguments]"
+  echo "Usage: `basename $0` <cron|download|update|updatedb|upgrade|run|make> [arguments]"
   exit 1
 elif [ "$1" == "cron" ]; then
   drupal_iterate cron
@@ -403,9 +297,6 @@ elif [ "$1" == "run" ]; then
 elif [ "$1" == "make" ]; then
   shift
   drupal_make $*
-elif [ "$1" == "install" ]; then
-  shift
-  drupal_install $*
 else
   echo "No action $1"
   exit 1