parent
0e60815415
commit
d6511ede23
|
@ -114,9 +114,7 @@ foreach ($domains as $key => $domain) {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
# 2.1 keep a copy of where it was, in an SQL request
|
# 2.1 keep a copy of where it was, in an SQL request
|
||||||
$backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest' WHERE `domaine`='$domain' AND sub='$sub';\n";
|
$backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest',web_action='UPDATE' WHERE `domaine`='$domain' AND sub='$sub';\n";
|
||||||
$backup .= "DELETE FROM `sub_domaines_standby` WHERE domaine='$domain' and sub='$sub';\n";
|
|
||||||
$backup .= "INSERT INTO sub_domaines_standby (compte,domaine,sub,valeur,type,action) values ('$cuid','$domain','$sub','$dest','$type',1);\n"; // UPDATE
|
|
||||||
|
|
||||||
# 2.2 change the subdomain to redirect to http://spam.koumbit.org/
|
# 2.2 change the subdomain to redirect to http://spam.koumbit.org/
|
||||||
$dom->lock();
|
$dom->lock();
|
||||||
|
|
|
@ -11,11 +11,23 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
|
||||||
AddHandler cgi-script .cgi
|
AddHandler cgi-script .cgi
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /var/alternc>
|
<Directory />
|
||||||
Order allow,deny
|
Options FollowSymLinks
|
||||||
Allow from none
|
AllowOverride None
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /var/alternc/bureau>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
|
||||||
|
php_admin_flag safe_mode_gid off
|
||||||
|
php_admin_flag safe_mode off
|
||||||
|
php_admin_flag register_globals on
|
||||||
|
AddDefaultCharset ISO-8859-1
|
||||||
|
php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
|
||||||
<Directory /var/alternc/html>
|
<Directory /var/alternc/html>
|
||||||
AllowOverride AuthConfig FileInfo Limit Options Indexes
|
AllowOverride AuthConfig FileInfo Limit Options Indexes
|
||||||
Options Indexes Includes FollowSymLinks MultiViews
|
Options Indexes Includes FollowSymLinks MultiViews
|
||||||
|
@ -33,10 +45,10 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /usr/share/phpmyadmin>
|
<Directory /usr/share/phpmyadmin>
|
||||||
AllowOverride AuthConfig Options FileInfo Limit Indexes
|
AllowOverride AuthConfig Options FileInfo Limit Indexes
|
||||||
Options Indexes Includes FollowSymLinks MultiViews
|
Options Indexes Includes FollowSymLinks MultiViews
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
Include /etc/alternc/bureau.conf
|
Include /etc/alternc/bureau.conf
|
||||||
|
|
|
@ -1,25 +1,10 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
DocumentRoot /var/alternc/bureau
|
DocumentRoot /var/alternc/bureau
|
||||||
ServerName %%fqdn%%
|
ServerName %%fqdn%%
|
||||||
|
|
||||||
alias /admin/sql /usr/share/phpmyadmin
|
alias /admin/sql /usr/share/phpmyadmin
|
||||||
alias /webmail /usr/share/squirrelmail
|
alias /webmail /usr/share/squirrelmail
|
||||||
|
|
||||||
<Directory />
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
Options FollowSymLinks
|
|
||||||
AllowOverride None
|
|
||||||
</Directory>
|
|
||||||
<Directory /var/alternc/bureau>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
|
|
||||||
php_admin_flag safe_mode_gid off
|
|
||||||
php_admin_flag safe_mode off
|
|
||||||
php_admin_flag register_globals on
|
|
||||||
AddDefaultCharset ISO-8859-1
|
|
||||||
php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
|
||||||
CustomLog /var/log/apache2/access.log alternc
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L]
|
RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L]
|
||||||
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
CustomLog /var/log/apache2/access.log alternc
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</Virtualhost>
|
</Virtualhost>
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
php_admin_value open_basedir "%%document_root%%:/usr/share/php/:/var/alternc/tmp:/tmp"
|
php_admin_value open_basedir "%%document_root%%:/usr/share/php/:/var/alternc/tmp:/tmp"
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
CustomLog /var/log/apache2/access.log alternc
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
CustomLog /var/log/apache2/access.log alternc
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -162,7 +162,8 @@ host_change_enable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
host_delete() {
|
host_delete() {
|
||||||
local FQDN=$1
|
local VTYPE=$1
|
||||||
|
local FQDN=$2
|
||||||
# Execute post-install hooks
|
# Execute post-install hooks
|
||||||
launch_hooks "delete" "$1" "$2" "$3" "$4"
|
launch_hooks "delete" "$1" "$2" "$3" "$4"
|
||||||
if [ $? -gt 10 ] ; then
|
if [ $? -gt 10 ] ; then
|
||||||
|
|
|
@ -76,7 +76,7 @@ MYSQL_UNREACHABLE_DATABASE=`$printf "$($gettext "Cannot access accounts database
|
||||||
# Have to get AlternC conf file :
|
# Have to get AlternC conf file :
|
||||||
! [ -f "$ALTERNC_CONF_FILE" ] && { echo $MISSING_CONF_FILE ; exit 1 ; } || . $ALTERNC_CONF_FILE
|
! [ -f "$ALTERNC_CONF_FILE" ] && { echo $MISSING_CONF_FILE ; exit 1 ; } || . $ALTERNC_CONF_FILE
|
||||||
mysql="$mysql --defaults-file=/etc/alternc/my.cnf"
|
mysql="$mysql --defaults-file=/etc/alternc/my.cnf"
|
||||||
$mysql -e "select count(*) from domaines_standby;" > /dev/null 2>&1
|
$mysql -e "desc domaines;" > /dev/null 2>&1
|
||||||
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
|
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
|
||||||
|
|
||||||
# Does the stuff
|
# Does the stuff
|
||||||
|
|
|
@ -75,7 +75,7 @@ MYSQL_UNREACHABLE_DATABASE=`$printf "$($gettext "Cannot access accounts database
|
||||||
! [ -f "$ALTERNC_CONF_FILE" ] && { echo $MISSING_CONF_FILE ; exit 1 ; } || . $ALTERNC_CONF_FILE
|
! [ -f "$ALTERNC_CONF_FILE" ] && { echo $MISSING_CONF_FILE ; exit 1 ; } || . $ALTERNC_CONF_FILE
|
||||||
# Must have access to mysql to retreive accounts owning domains :
|
# Must have access to mysql to retreive accounts owning domains :
|
||||||
mysql="$mysql --defaults-file=/etc/alternc/my.cnf -B -N -e"
|
mysql="$mysql --defaults-file=/etc/alternc/my.cnf -B -N -e"
|
||||||
$mysql "select count(*) from domaines_standby;" > /dev/null 2>&1
|
$mysql "desc domaines;" > /dev/null 2>&1
|
||||||
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
|
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
|
||||||
|
|
||||||
# Does the stuff
|
# Does the stuff
|
||||||
|
|
|
@ -169,7 +169,7 @@ LOG_FILE=$LOG_DIR/access.log
|
||||||
[ -f "$ALTERNC_CONF_FILE" ] || { echo $MISSING_CONF_FILE ; exit 1 ; } && . $ALTERNC_CONF_FILE
|
[ -f "$ALTERNC_CONF_FILE" ] || { echo $MISSING_CONF_FILE ; exit 1 ; } && . $ALTERNC_CONF_FILE
|
||||||
# Must have access to mysql to retreive accounts owning domains :
|
# Must have access to mysql to retreive accounts owning domains :
|
||||||
mysql="$mysql --defaults-file=/etc/alternc/my.cnf -B -N -e"
|
mysql="$mysql --defaults-file=/etc/alternc/my.cnf -B -N -e"
|
||||||
$mysql "select count(*) from domaines_standby;" > /dev/null 2>&1
|
$mysql "desc domaines;" > /dev/null 2>&1
|
||||||
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
|
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
|
||||||
# Prevents executing more than one shell at the same time
|
# Prevents executing more than one shell at the same time
|
||||||
$lockfilecreate --retry 1 $LOCK_FILE
|
$lockfilecreate --retry 1 $LOCK_FILE
|
||||||
|
|
Loading…
Reference in New Issue