Commit e5c9ff49 authored by Nigel McNie's avatar Nigel McNie
Browse files
parents 6a6c2ab9 d9385aef
<VirtualHost *>
Include /etc/mahara/servername.conf
DocumentRoot /var/www/mahara
DocumentRoot /usr/share/mahara
CustomLog __APACHELOGDIR__/mahara.access.log combined
ErrorLog __APACHELOGDIR__/mahara.error.log
php_value upload_max_filesize 5M
<Directory /var/www/mahara>
<Directory /usr/share/mahara>
Options -Indexes
AllowOverride All
</Directory>
......
......@@ -21,7 +21,3 @@ function restart_apache2 {
echo ""
fi
}
function set_config {
perl -i -e '$field=shift;$value=shift if (scalar(@ARGV)>1);$value||="";while (<>) { s/(?:\s*\/\/\s*)?(\$cfg->$field.*=\s*).*/$1'\''$value'\'';/; print; }' $1 $2 /etc/mahara/config.debconf.php
}
<?php
// WARNING: DO NOT EDIT THIS FILE!
//
// It is automatically generated by debconf and will be overwritten
// everytime the mahara Debian package is upgraded.
//
// Your local customizations should go into /etc/mahara/config.php
$cfg->dbtype = 'postgres8';
$cfg->dbhost = 'localhost';
$cfg->dbport = '';
$cfg->dbname = 'mahara';
$cfg->dbuser = 'mahara';
$cfg->dbpass = '';
$cfg->wwwroot = 'http://localhost/mahara/';
$cfg->smtphosts = '';
$cfg->dataroot = '/var/lib/mahara';
?>
Source: mahara
Section: web
Priority: optional
Maintainer: Martyn Smith <martyn@catalyst.net.nz>
Maintainer: Francois Marier <francois@debian.org>
Build-Depends: debhelper (>= 5), po-debconf
Standards-Version: 3.7.2
Homepage: http://www.mahara.org
Vcs-Git: http://git.catalyst.net.nz/mahara.git
Vcs-Browser: http://git.catalyst.net.nz/gw?p=mahara.git
Package: mahara
Architecture: all
Depends: ${misc:Depends}, php5-pgsql, php5-cli, php5-gd, file, cron, perl
Recommends: mahara-apache2 | mahara-apache, postgresql-8.1, clamav, clamav-daemon, php5-curl, php5-openssl, php5-xmlrpc, php5-imagick, libfile-slurp-perl, libtext-diff-perl
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
.
Mahara is designed to provide users with the tools to create a personal and
professional learning and development environment.
.
This is the core Mahara package, it does not include any of the web server
configuration.
Package: mahara-apache
Architecture: all
Depends: ${misc:Depends}, apache, libapache-mod-php5, php5-json | libapache-mod-php5 (>= 5.2), php5-pgsql, php5-cli, php5-gd, file, cron
Depends: ${misc:Depends}, mahara, apache, libapache-mod-php5
Conflicts: mahara-apache2
Recommends: postgresql-8.1, clamav, clamav-daemon, php5-xmlrpc
Suggests: php5-imagick, libfile-slurp-perl, libtext-diff-perl
Pre-Depends: m4, perl, postgresql-client-8.1
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
.
Mahara is designed to provide users with the tools to create a personal and
professional learning and development environment.
.
This package configures Mahara for the Apache 1.x web server.
Package: mahara-apache2
Architecture: all
Depends: ${misc:Depends}, apache2, libapache2-mod-php5, php5-json | libapache2-mod-php5 (>= 5.2), php5-pgsql, php5-cli, php5-gd, file, cron
Depends: ${misc:Depends}, mahara, apache2, libapache2-mod-php5
Conflicts: mahara-apache
Recommends: postgresql-8.1, clamav, clamav-daemon, php5-xmlrpc
Suggests: php5-imagick, libfile-slurp-perl, libtext-diff-perl
Pre-Depends: m4, perl, postgresql-client-8.1
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
.
Mahara is designed to provide users with the tools to create a personal and
professional learning and development environment.
.
This package configures Mahara for the Apache 2.x web server.
htdocs/* var/www/mahara
htdocs/.htaccess var/www/mahara
debian/servername.conf etc/mahara/
debian/serverredirects.conf etc/mahara/
debian/config.debconf.php etc/mahara/
config
\ No newline at end of file
#!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
# Decide how important it is for the user to see this message
PRIORITY=high
db_input $PRIORITY mahara/serverredirects || true
db_go
cron.d
\ No newline at end of file
dirs
\ No newline at end of file
docs
\ No newline at end of file
install
\ No newline at end of file
var/www/mahara/js/MochiKit/Packed.js var/www/mahara/js/MochiKit/setup.js
etc/mahara/config.debconf.php var/www/mahara/config.debconf.php
etc/mahara/config.php var/www/mahara/config.php
etc/mahara/apache.conf etc/apache/conf.d/mahara
etc/mahara/apache.conf etc/apache/conf.d/mahara
logrotate
\ No newline at end of file
......@@ -26,51 +26,25 @@ SERVERNAME_CONF_FILE=/etc/mahara/servername.conf
case "$1" in
configure)
# Configure Mahara
db_get mahara/db_type
set_config dbtype "${RET}"
db_get mahara/db_host
set_config dbhost "${RET}"
db_get mahara/db_port
set_config dbport "${RET}"
db_get mahara/db_name
set_config dbname "${RET}"
db_get mahara/db_user
set_config dbuser "${RET}"
db_get mahara/db_pass
set_config dbpass "${RET}"
db_get mahara/servername
set_config wwwroot "http://${RET}/"
db_get mahara/smtphosts
if [ -n "${RET}" ]; then
set_config smtphosts "${RET}"
fi
# Set Dataroot
chown -R www-data:www-data /var/lib/mahara
set_config dataroot /var/lib/mahara
# Touch cron log
touch /var/log/mahara-cron.log
chown www-data:www-data /var/log/mahara-cron.log
# Configure apache
echo "# DO NOT EDIT THIS FILE! It is managed by debconf!" > $SERVERNAME_CONF_FILE
echo "# It will be overwritten the next time this package is configured." >> $SERVERNAME_CONF_FILE
echo "# Use 'dpkg-reconfigure mahara-apache' instead." >> $SERVERNAME_CONF_FILE
db_get mahara/servername
perl -i -p -e "s/^ServerName.*$/ServerName ${RET}/" $SERVERNAME_CONF_FILE
echo "ServerName ${RET}" >> $SERVERNAME_CONF_FILE
echo '# DO NOT EDIT THIS FILE. It is managed by debconf!' > $SERVERREDIRECTS_CONF_FILE
echo "# It will be overwritten the next time this package is configured." >> $SERVERREDIRECTS_CONF_FILE
echo "# Use 'dpkg-reconfigure mahara-apache' instead." >> $SERVERREDIRECTS_CONF_FILE
db_get mahara/serverredirects
if [ -n "${RET}" ]; then
echo '<VirtualHost *>' >> $SERVERREDIRECTS_CONF_FILE
echo '<VirtualHost *>' > $SERVERREDIRECTS_CONF_FILE
echo ${RET} | perl -ne '@s = split /\s*,\s*/; print " ServerName ", shift @s, "\n" if @s; print map { " ServerAlias $_\n" } @s;' >> $SERVERREDIRECTS_CONF_FILE
db_get mahara/servername
echo " Redirect Permanent / http://${RET}/" >> $SERVERREDIRECTS_CONF_FILE
echo '</VirtualHost>' >> $SERVERREDIRECTS_CONF_FILE
else
echo '# DO NOT EDIT THIS FILE. It is managed by debconf!' > $SERVERREDIRECTS_CONF_FILE
fi
restart_apache;
db_get mahara/servername
echo ""
......
......@@ -23,10 +23,8 @@ set -e
case "$1" in
purge)
restart_apache;
rm -f /var/log/mahara-cron.log*
rm -f /var/log/apache2/mahara.access.log*
rm -f /var/log/apache2/mahara.error.log*
[ -d /var/lib/mahara ] && echo "NOTE: purge does _not_ remove /var/lib/mahara, you must do this yourself if you really want to!"
rm -f /var/log/apache/mahara.access.log*
rm -f /var/log/apache/mahara.error.log*
;;
remove)
restart_apache;
......
preinst
\ No newline at end of file
#!/bin/sh
# prerm script for mahara
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|deconfigure)
[ -e /etc/apache/conf.d/100-mahara ] && rm -f /etc/apache/conf.d/100-mahara
[ -e /var/www/mahara/config.php ] && rm -f /var/www/mahara/config.php
;;
upgrade)
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
templates
\ No newline at end of file
Template: mahara/serverredirects
Type: string
Default:
_Description: Server redirects:
Comma separated list of domain names that the server should permanently
redirect to the server name.
.
Note that this is just the domain name, so for "http://my.site.com" you only
need to enter "my.site.com"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment