From: Penny Leach Date: Tue, 15 Apr 2008 02:57:33 +0000 (+1200) Subject: removing profiles I don't use (leftovers from martyn & nigel) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5df8d2c6c359bc4b5cb6a9bb8d0600c82460c0f4;p=vserverctl.git removing profiles I don't use (leftovers from martyn & nigel) --- diff --git a/profile/drupal/data/.bash_once b/profile/drupal/data/.bash_once deleted file mode 100644 index b06e74e..0000000 --- a/profile/drupal/data/.bash_once +++ /dev/null @@ -1,3 +0,0 @@ -# Now install drupal -curl http://__VSNAME__.__HOST__.wgtn.cat-it.co.nz/install.php?profile=vserver > /dev/null -chmod 644 /home/$USER/htdocs/sites/default/settings.php diff --git a/profile/drupal/data/drupal-5.1.tar.gz b/profile/drupal/data/drupal-5.1.tar.gz deleted file mode 100644 index 866570e..0000000 Binary files a/profile/drupal/data/drupal-5.1.tar.gz and /dev/null differ diff --git a/profile/drupal/data/drupal-new-site.sh b/profile/drupal/data/drupal-new-site.sh deleted file mode 100755 index b12b34b..0000000 --- a/profile/drupal/data/drupal-new-site.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -echo "This script creates a new drupal site. It assumes the site will be created" -echo "as a new subdomain of $(hostname -d)" - -SITENAME=$1 -if [ -z $SITENAME ]; then - echo -n "New site name? " - read SITENAME - - if [ -z $SITENAME ]; then - echo "No site name given, aborting" - exit 1 - fi - - if grep "$SITENAME.$(hostname -d)" /etc/apache2/sites-enabled/drupal.conf > /dev/null; then - echo "This site already exists in /etc/apache2/sites-enabled/drupal.conf, aborting" - exit 1 - fi -fi - -FULLSITENAME="$SITENAME.$(hostname -d)" - -# Enter a new virtualhost entry for the site -echo "Creating new site $FULLSITENAME" diff --git a/profile/drupal/data/drupal.conf b/profile/drupal/data/drupal.conf deleted file mode 100644 index 371f65d..0000000 --- a/profile/drupal/data/drupal.conf +++ /dev/null @@ -1,16 +0,0 @@ - - ServerName __VSNAME__.__HOST__.wgtn.cat-it.co.nz - - DocumentRoot /home/__PROFILEOPTION_username__/htdocs - - - RewriteEngine on - RewriteBase / - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] - - AllowOverride all - - - diff --git a/profile/drupal/data/drupal.cron b/profile/drupal/data/drupal.cron deleted file mode 100644 index feb5935..0000000 --- a/profile/drupal/data/drupal.cron +++ /dev/null @@ -1 +0,0 @@ -* * * * * root curl --silent --compressed http://__VSNAME__.__HOST__.wgtn.cat-it.co.nz/cron.php diff --git a/profile/drupal/data/postgres.connect.patch b/profile/drupal/data/postgres.connect.patch deleted file mode 100644 index b51de41..0000000 --- a/profile/drupal/data/postgres.connect.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- includes/install.pgsql.inc 2006-12-28 02:02:34.000000000 +1300 -+++ includes/install.pgsql.inc 2007-03-29 17:44:23.000000000 +1200 -@@ -34,11 +34,12 @@ - $url['path'] = urldecode($url['path']); - - // Build pgsql connection string and allow for non-standard PostgreSQL port. -- $conn_string = ' user='. $url['user'] .' dbname='. substr($url['path'], 1) .' password='. $url['pass'] . ' host=' . $url['host']; -+ $conn_string = ' user='. $url['user'] .' dbname='. substr($url['path'], 1) . ' host=' . $url['host']; -+ $conn_string .= isset($url['pass']) ? ' password=' . $url['pass'] : ''; - $conn_string .= isset($url['port']) ? ' port=' . $url['port'] : ''; - - // Test connecting to the database. -- $connection = @pg_connect($conn_string); -+ $connection = pg_connect($conn_string); - if (!$connection) { - drupal_set_message(st('Failure to connect to your PostgreSQL database server. PostgreSQL reports the following message: %error.For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.', array('%error' => 'Connection failed. See log file for failure reason')), 'error'); - return FALSE; - diff --git a/profile/drupal/data/settings.php b/profile/drupal/data/settings.php deleted file mode 100755 index 4e67d95..0000000 --- a/profile/drupal/data/settings.php +++ /dev/null @@ -1,168 +0,0 @@ - 'main_', - * 'users' => 'shared_', - * 'sessions' => 'shared_', - * 'role' => 'shared_', - * 'authmap' => 'shared_', - * 'sequences' => 'shared_', - * ); - * - * Database URL format: - * $db_url = 'mysql://username:password@localhost/databasename'; - * $db_url = 'mysqli://username:password@localhost/databasename'; - * $db_url = 'pgsql://username:password@localhost/databasename'; - */ -$db_url = 'pgsql://general@pg81/__VSNAME__'; -$db_prefix = ''; - -/** - * Base URL (optional). - * - * If you are experiencing issues with different site domains, - * uncomment the Base URL statement below (remove the leading hash sign) - * and fill in the URL to your Drupal installation. - * - * You might also want to force users to use a given domain. - * See the .htaccess file for more information. - * - * Examples: - * $base_url = 'http://www.example.com'; - * $base_url = 'http://www.example.com:8888'; - * $base_url = 'http://www.example.com/drupal'; - * $base_url = 'https://www.example.com:8888/drupal'; - * - * It is not allowed to have a trailing slash; Drupal will add it - * for you. - */ -# $base_url = 'http://www.example.com'; // NO trailing slash! - -/** - * PHP settings: - * - * To see what PHP settings are possible, including whether they can - * be set at runtime (ie., when ini_set() occurs), read the PHP - * documentation at http://www.php.net/manual/en/ini.php#ini.list - * and take a look at the .htaccess file to see which non-runtime - * settings are used there. Settings defined here should not be - * duplicated there so as to avoid conflict issues. - */ -ini_set('arg_separator.output', '&'); -ini_set('magic_quotes_runtime', 0); -ini_set('magic_quotes_sybase', 0); -ini_set('session.cache_expire', 200000); -ini_set('session.cache_limiter', 'none'); -ini_set('session.cookie_lifetime', 2000000); -ini_set('session.gc_maxlifetime', 200000); -ini_set('session.save_handler', 'user'); -ini_set('session.use_only_cookies', 1); -ini_set('session.use_trans_sid', 0); -ini_set('url_rewriter.tags', ''); - -/** - * We try to set the correct cookie domain. If you are experiencing problems - * try commenting out the code below or specifying the cookie domain by hand. - */ -if (isset($_SERVER['HTTP_HOST'])) { - $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']); - // Per RFC 2109, cookie domains must contain at least one dot other than the - // first. For hosts such as 'localhost', we don't set a cookie domain. - if (count(explode('.', $domain)) > 2) { - ini_set('session.cookie_domain', $domain); - } -} - -/** - * Variable overrides: - * - * To override specific entries in the 'variable' table for this site, - * set them here. You usually don't need to use this feature. This is - * useful in a configuration file for a vhost or directory, rather than - * the default settings.php. Any configuration setting from the 'variable' - * table can be given a new value. - * - * Remove the leading hash signs to enable. - */ -# $conf = array( -# 'site_name' => 'My Drupal site', -# 'theme_default' => 'minnelli', -# 'anonymous' => 'Visitor', -# ); - diff --git a/profile/drupal/data/vserver.profile b/profile/drupal/data/vserver.profile deleted file mode 100644 index 7dc081a..0000000 --- a/profile/drupal/data/vserver.profile +++ /dev/null @@ -1,33 +0,0 @@ - 'Vserver Drupal Instance: __VSNAME__', - 'description' => 'Automatically installed via vserverctl on __HOST__', - ); -} - -function vserver_profile_final() { - user_save(new stdClass(), - array( - 'name' => 'admin', - 'pass' => 'admin', - 'mail' => '__PROFILEOPTION_username__@catalyst.net.nz', - 'status' => 1 - ) - ); - return '

Vserver "__VSNAME__" successfully installed via vserverctl

'; -} diff --git a/profile/drupal/files b/profile/drupal/files deleted file mode 100644 index b89123a..0000000 --- a/profile/drupal/files +++ /dev/null @@ -1,3 +0,0 @@ -drupal-5.1.tar.gz /root/ -postgres.connect.patch /root/ -drupal-new-site.sh /home/nigel/ diff --git a/profile/drupal/options b/profile/drupal/options deleted file mode 100644 index 27d7766..0000000 --- a/profile/drupal/options +++ /dev/null @@ -1 +0,0 @@ -username diff --git a/profile/drupal/packages b/profile/drupal/packages deleted file mode 100644 index a27ce99..0000000 --- a/profile/drupal/packages +++ /dev/null @@ -1,11 +0,0 @@ -apache2 -libapache2-mod-php5 -php5-pgsql -php5-gd -file -cogito -make -python -build-essential -debhelper -fakeroot diff --git a/profile/drupal/post-vserver b/profile/drupal/post-vserver deleted file mode 100644 index 0ef15a6..0000000 --- a/profile/drupal/post-vserver +++ /dev/null @@ -1,29 +0,0 @@ -USR=${PROFILEOPTION_username} -mkdir /home/$USR/htdocs -echo '' > /home/$USR/htdocs/index.php - -cd /home/$USR - -tar zxvf /root/drupal-5.1.tar.gz -mv drupal-5.1/* htdocs/ -mv drupal-5.1/.htaccess htdocs/ -rmdir drupal-5.1 -mkdir htdocs/profiles/vserver -cp /root/vserver.profile htdocs/profiles/vserver/ -cp /root/settings.php htdocs/sites/default/ - -( cd htdocs; patch -p0 < /root/postgres.connect.patch ) - -chown -R $USR:$USR /home/$USR -chmod 777 /home/$USR/htdocs/sites/default/settings.php - -# Make data directory -mkdir htdocs/files -chown www-data:www-data htdocs/files - -# Configure apache2 -rm /etc/apache2/sites-enabled/000-default -echo -e "NameVirtualHost *\nServerName drupal" > /etc/apache2/conf.d/vhost - -a2enmod rewrite -/etc/init.d/apache2 force-reload diff --git a/profile/drupal/pre-host b/profile/drupal/pre-host deleted file mode 100644 index 5a66881..0000000 --- a/profile/drupal/pre-host +++ /dev/null @@ -1,6 +0,0 @@ -# Create the database for the mahara install -vserver pg81 suexec postgres createdb ${VSNAME} -Ogeneral -EUNICODE - -# Remove the tmp filesystem mounting -grep -v tmp /etc/vservers/${VSNAME}/fstab > /etc/vservers/${VSNAME}/fstab.new -mv /etc/vservers/${VSNAME}/fstab.new /etc/vservers/${VSNAME}/fstab diff --git a/profile/drupal/pre-vserver b/profile/drupal/pre-vserver deleted file mode 100644 index e69de29..0000000 diff --git a/profile/drupal/profile.conf b/profile/drupal/profile.conf deleted file mode 100644 index b96aaa2..0000000 --- a/profile/drupal/profile.conf +++ /dev/null @@ -1 +0,0 @@ -parent = webserver diff --git a/profile/drupal/remove-host b/profile/drupal/remove-host deleted file mode 100644 index 7398f97..0000000 --- a/profile/drupal/remove-host +++ /dev/null @@ -1,2 +0,0 @@ -# Drop the database -vserver pg81 suexec postgres dropdb ${VSNAME} diff --git a/profile/drupal/templates b/profile/drupal/templates deleted file mode 100644 index 86f5f3c..0000000 --- a/profile/drupal/templates +++ /dev/null @@ -1,5 +0,0 @@ -drupal.conf /etc/apache2/sites-enabled/ -vserver.profile /root/ -settings.php /root/ -.bash_once /home/nigel/ -drupal.cron /etc/cron.d/drupal diff --git a/profile/mahara-dev/data/.bash_once b/profile/mahara-dev/data/.bash_once deleted file mode 100644 index 30a4f25..0000000 --- a/profile/mahara-dev/data/.bash_once +++ /dev/null @@ -1,14 +0,0 @@ -# Check out and set up the mahara install -cg-clone "git+ssh://git.catalyst.net.nz/var/git/mahara.git#__PROFILEOPTION_branch__" mahara -sudo chown __PROFILEOPTION_username__:__PROFILEOPTION_username__ config.php -mv config.php mahara/htdocs/ -mkdir mahara/logs/ -sudo chown www-data:www-data mahara/logs -mkdir mahara/.patches -sudo mkdir /var/lib/mahara -sudo chown www-data:www-data /var/lib/mahara - -sudo apachectl restart - -# Make this file owned by the user. Might be nicer if the permissions could be controlled by the 'files' file... -sudo chown $USER:$USER .bash_once diff --git a/profile/mahara-dev/data/config.php b/profile/mahara-dev/data/config.php deleted file mode 100644 index 62490ef..0000000 --- a/profile/mahara-dev/data/config.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL - * @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz - * - */ - -$cfg = new StdClass; - - -// database connection details -$cfg->dbtype = 'postgres8'; -$cfg->dbhost = 'pg81'; -$cfg->dbport = 5432; -$cfg->dbname = '__VSNAME__'; -$cfg->dbuser = 'general'; -$cfg->dbpass = ''; -$cfg->dbprefix = ''; - -// wwwroot - the web-visible path to your Mahara installation -// Normally, this is automatically detected - if it doesn't work for you -// then try specifying it here -//$cfg->wwwroot = 'http://myhost.com/mahara/'; - -// dataroot - uploaded files are stored here -// must be writable by the webserver and outside document root. -// Mahara will NOT RUN if this is inside your document root, because -// this is a big security hole. -$cfg->dataroot = '/var/lib/mahara'; - -// system mail address. emails out come from this address. -// if not specified, will default to noreply@ automatically detected host. -// if that doesn't work or you want something else, then specify it here. -// $cfg->noreplyaddress = 'noreply@myhost.com' - -// Logging configuration -// For each log level, you can specify where the messages are displayed. -// LOG_TARGET_SCREEN makes the error messages go to the screen - useful -// when debugging but not on a live site! -// LOG_TARGET_ERRORLOG makes the error messages go to the log as specified -// by the apache ErrorLog directive. It's probably useful to have this on -// for all log levels. -// You can combine them with bitwise operations, -// e.g. LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG -// -// This configuration is suitable for people running Mahara for the first -// time. You will immediately see environment errors, and so can correct -// them. You will be able to see other debugging information in your error -// logs. Once your site is up and running you might want to remove the -// environment level logging completely, and just log everything else to -// the error log. -$cfg->log_dbg_targets = LOG_TARGET_ERRORLOG; -$cfg->log_info_targets = LOG_TARGET_ERRORLOG; -$cfg->log_warn_targets = LOG_TARGET_ERRORLOG; -$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG; -// This configuration is suitable for developers. You will see all errors -// and they will also be in the logs. -//$cfg->log_dbg_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG; -//$cfg->log_info_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG; -//$cfg->log_warn_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG; -//$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG; - -// The log levels that will generate backtraces. Useful for development, -// but probably only warnings are useful on a live site. -$cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON; - -// mail handling -// if you want mahara to use smtp servers to send mail, enter one or more here -// blank means mahara will use the default PHP method. -$cfg->smtphosts = 'smtp.catalyst.net.nz'; -// If you have specified an smtp server above, and the server requires authentication, -// enter them here -// $cfg->smtpuser = ''; -// $cfg->smtppass = ''; -?> diff --git a/profile/mahara-dev/data/mahara.conf b/profile/mahara-dev/data/mahara.conf deleted file mode 100644 index 9504e20..0000000 --- a/profile/mahara-dev/data/mahara.conf +++ /dev/null @@ -1,12 +0,0 @@ -NameVirtualHost *:80 - - ServerName __VSNAME__.__HOST__.wgtn.cat-it.co.nz - DocumentRoot /home/__PROFILEOPTION_username__/mahara/htdocs - - - AllowOverride all - - - ErrorLog /home/__PROFILEOPTION_username__/mahara/logs/error.log - CustomLog /home/__PROFILEOPTION_username__/mahara/logs/access.log full - diff --git a/profile/mahara-dev/options b/profile/mahara-dev/options deleted file mode 100644 index 80858c1..0000000 --- a/profile/mahara-dev/options +++ /dev/null @@ -1 +0,0 @@ -branch diff --git a/profile/mahara-dev/packages b/profile/mahara-dev/packages deleted file mode 100644 index c7bc263..0000000 --- a/profile/mahara-dev/packages +++ /dev/null @@ -1,14 +0,0 @@ -apache -libapache-mod-php5 -php5-pgsql -php5-gd -file -clamav-daemon -clamav-freshclam -cogito -make -python -sun-java5-jdk -build-essential -debhelper -fakeroot diff --git a/profile/mahara-dev/pre-host b/profile/mahara-dev/pre-host deleted file mode 100644 index 5a66881..0000000 --- a/profile/mahara-dev/pre-host +++ /dev/null @@ -1,6 +0,0 @@ -# Create the database for the mahara install -vserver pg81 suexec postgres createdb ${VSNAME} -Ogeneral -EUNICODE - -# Remove the tmp filesystem mounting -grep -v tmp /etc/vservers/${VSNAME}/fstab > /etc/vservers/${VSNAME}/fstab.new -mv /etc/vservers/${VSNAME}/fstab.new /etc/vservers/${VSNAME}/fstab diff --git a/profile/mahara-dev/pre-vserver b/profile/mahara-dev/pre-vserver deleted file mode 100644 index ebdbf0a..0000000 --- a/profile/mahara-dev/pre-vserver +++ /dev/null @@ -1 +0,0 @@ -echo 'sun-java5-bin shared/accepted-sun-dlj-v1-1 boolean true' | debconf-set-selections diff --git a/profile/mahara-dev/profile.conf b/profile/mahara-dev/profile.conf deleted file mode 100644 index b96aaa2..0000000 --- a/profile/mahara-dev/profile.conf +++ /dev/null @@ -1 +0,0 @@ -parent = webserver diff --git a/profile/mahara-dev/remove-host b/profile/mahara-dev/remove-host deleted file mode 100644 index 7398f97..0000000 --- a/profile/mahara-dev/remove-host +++ /dev/null @@ -1,2 +0,0 @@ -# Drop the database -vserver pg81 suexec postgres dropdb ${VSNAME} diff --git a/profile/mahara-dev/templates b/profile/mahara-dev/templates deleted file mode 100644 index aded7d8..0000000 --- a/profile/mahara-dev/templates +++ /dev/null @@ -1,3 +0,0 @@ -mahara.conf /etc/apache/conf.d/ -config.php /home/__PROFILEOPTION_username__/ -.bash_once /home/__PROFILEOPTION_username__/ diff --git a/profile/mahara-trunk/aptsources b/profile/mahara-trunk/aptsources deleted file mode 100644 index a611b04..0000000 --- a/profile/mahara-trunk/aptsources +++ /dev/null @@ -1,2 +0,0 @@ -# Mahara -deb http://debian.mahara.org/ unstable mahara diff --git a/profile/mahara-trunk/post-vserver b/profile/mahara-trunk/post-vserver deleted file mode 100644 index 70abbf7..0000000 --- a/profile/mahara-trunk/post-vserver +++ /dev/null @@ -1,8 +0,0 @@ -echo 'debconf debconf/priority select critical' | debconf-set-selections -echo 'mahara-apache2 mahara/db_host string pg81' | debconf-set-selections -echo 'mahara-apache2 mahara/db_port string 5432' | debconf-set-selections -echo "mahara-apache2 mahara/db_name string ${VSNAME}" | debconf-set-selections -echo 'mahara-apache2 mahara/db_user string martyn' | debconf-set-selections -echo "mahara-apache2 mahara/servername string ${VSNAME}.abelard.wgtn.cat-it.co.nz" | debconf-set-selections - -DEBCONF_FRONTEND=noninteractive apt-get install mahara-apache2 --assume-yes --force-yes diff --git a/profile/mahara-trunk/pre-host b/profile/mahara-trunk/pre-host deleted file mode 100644 index ef29cf0..0000000 --- a/profile/mahara-trunk/pre-host +++ /dev/null @@ -1,2 +0,0 @@ -vserver pg81 suexec postgres createdb ${VSNAME} -Omartyn -EUNICODE - diff --git a/profile/mahara-trunk/profile.conf b/profile/mahara-trunk/profile.conf deleted file mode 100644 index b96aaa2..0000000 --- a/profile/mahara-trunk/profile.conf +++ /dev/null @@ -1 +0,0 @@ -parent = webserver diff --git a/profile/mahara-trunk/remove-host b/profile/mahara-trunk/remove-host deleted file mode 100644 index 975d464..0000000 --- a/profile/mahara-trunk/remove-host +++ /dev/null @@ -1 +0,0 @@ -vserver pg81 suexec postgres dropdb ${VSNAME}