Merge changesets 2975 and 2978 from trunk to branch stable 1.0.

This commit is contained in:
Alexis Lahouze 2011-06-04 09:36:09 +00:00
parent 2a6eaf60f3
commit e1a32cd421
8 changed files with 12 additions and 5 deletions

1
.gitattributes vendored
View File

@ -453,6 +453,7 @@ po/fr/LC_MESSAGES/alternc-admintools.po -text
/quota_init -text /quota_init -text
src/Makefile -text src/Makefile -text
src/alternc-check -text src/alternc-check -text
src/alternc-dboptimize -text
src/alternc-passwd -text src/alternc-passwd -text
src/alternc_reload -text src/alternc_reload -text
src/du.pl -text src/du.pl -text

View File

@ -42,7 +42,7 @@ if ($mem->checkRight()) { ?>
<li><a href="quotas_users.php?mode=4"><span style="color: red;"><?php __("User Quotas"); ?></span></a></li> <li><a href="quotas_users.php?mode=4"><span style="color: red;"><?php __("User Quotas"); ?></span></a></li>
<?php if ($cuid == 2000) { ?> <?php if ($cuid == 2000) { ?>
<li><a href="adm_panel.php"><span style="color: red;"><?php __("Admin Control Panel"); ?></span></a></li> <li><a href="adm_panel.php"><span style="color: red;"><?php __("Admin Control Panel"); ?></span></a></li>
<li><a href="/admin/sql/?server=2"><span style="color: red;"><?php __("General PhpMyAdmin"); ?></span></a></li> <li><a href="/altenrc-sql/?server=2"><span style="color: red;"><?php __("General PhpMyAdmin"); ?></span></a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</div> </div>

View File

@ -37,7 +37,7 @@ if (!$r=$mysql->get_dblist()) {
setcookie("REMOTE_PASSWORD",$r[0]["pass"],0,"/"); setcookie("REMOTE_PASSWORD",$r[0]["pass"],0,"/");
if ($lang) $l="&lang=".substr($lang,0,2); if ($lang) $l="&lang=".substr($lang,0,2);
// TODO : make it an absolute url ! (even in httpS :)) // TODO : make it an absolute url ! (even in httpS :))
header("Location: /admin/sql/index.php?server=1"); header("Location: /alternc-sql/index.php?server=1");
exit(); exit();
} }

View File

@ -15,3 +15,5 @@
# You may put this computing every week only or on your filer on busy services. # You may put this computing every week only or on your filer on busy services.
0 2 * * * www-data /usr/lib/alternc/spoolsize.php 0 2 * * * www-data /usr/lib/alternc/spoolsize.php
# Once a week at 7am, optimise the AlternC database
0 1 * * 7 alterncpanel /usr/lib/alternc/alternc-dboptimize

View File

@ -4,6 +4,6 @@
RewriteEngine on RewriteEngine on
RewriteRule ^/admin/(.*) /$1 [R=301,L] RewriteRule ^/admin/(.*) /$1 [R=301,L]
alias /sql /usr/share/phpmyadmin alias /alternc-sql /usr/share/phpmyadmin
alias /webmail /usr/share/squirrelmail alias /webmail /usr/share/squirrelmail

View File

@ -4,7 +4,7 @@
RewriteEngine on RewriteEngine on
RewriteRule ^/admin/(.*) /$1 RewriteRule ^/admin/(.*) /$1
alias /admin/sql /usr/share/phpmyadmin alias /alternc-sql /usr/share/phpmyadmin
alias /webmail /usr/share/squirrelmail alias /webmail /usr/share/squirrelmail
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

View File

@ -26,7 +26,7 @@
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# #
SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del
SCRIPTS=quota_edit.sh quota_get.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh SCRIPTS=quota_edit.sh quota_get.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh alternc-check alternc-dboptimize
LIBS=functions.sh functions_hosting.sh functions_dns.sh LIBS=functions.sh functions_hosting.sh functions_dns.sh
BIN=$(DESTDIR)/usr/lib/alternc/ BIN=$(DESTDIR)/usr/lib/alternc/

4
src/alternc-dboptimize Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# Optimize alternc databases
/usr/bin/mysqlcheck --defaults-file=/etc/alternc/my.cnf --quick --force --optimize --auto-repair --databases $(cat /etc/alternc/my.cnf |grep ^database|cut -d '"' -f 2) > /dev/null