Le panel est rangé dans /usr/share/alternc/panel

This commit is contained in:
Alan Garcia 2013-02-18 14:55:42 +00:00
parent 6bac69eca4
commit 6f1dc40919
18 changed files with 37 additions and 37 deletions

View File

@ -27,7 +27,7 @@ in a debian server could help finding the right way to do it (eg: bind9 ) ;)
This question MAY be asked to the user when launching alternc installer manually (on an interactive shell)
Partially fixed:
- the control panel is located in /var/alternc/bureau => move it to /usr/lib/alternc/panel
- the control panel is located in /var/alternc/bureau => move it to /usr/share/alternc/panel
- the html data are in /var/alternc/html/[a-z0-9] => move them to /var/www/alternc/[a-z0-9]
- the mail data are in /var/alternc/mail/[a-z0-9] => move them to /var/mail/alternc/[a-z0-9]

View File

@ -98,7 +98,7 @@ require_once(dirname(__FILE__)."/local.php");
define('ALTERNC_MAIL', "$L_ALTERNC_MAIL");
define('ALTERNC_HTML', "$L_ALTERNC_HTML");
define('ALTERNC_LOGS', "$L_ALTERNC_LOGS");
define('ALTERNC_PANEL', "/usr/lib/alternc/panel");
define('ALTERNC_PANEL', "/usr/share/alternc/panel");
define('ALTERNC_LOCALES', ALTERNC_PANEL."/locales");
/* PHPLIB inclusions : */

View File

@ -3,11 +3,11 @@ etc/cron.d
etc/awstats
etc/alternc/templates/awstats
var/cache/awstats
usr/lib/alternc/panel/class
usr/lib/alternc/panel/admin
usr/lib/alternc/panel/locales/fr_FR/LC_MESSAGES
usr/lib/alternc/panel/locales/en_US/LC_MESSAGES
usr/lib/alternc/panel/locales/es_ES/LC_MESSAGES
usr/share/alternc/panel/class
usr/share/alternc/panel/admin
usr/share/alternc/panel/locales/fr_FR/LC_MESSAGES
usr/share/alternc/panel/locales/en_US/LC_MESSAGES
usr/share/alternc/panel/locales/es_ES/LC_MESSAGES
usr/lib/alternc
usr/share/alternc
usr/share/doc/alternc-awstats

View File

@ -3,5 +3,5 @@ etc/alternc/templates/squirrelmail
etc/alternc/templates/apache2
etc/squirrelmail
usr/lib/alternc/install.d
usr/lib/alternc/panel/class
usr/share/alternc/panel/class
usr/share/squirrelmail/plugins/alternc_changepass

2
debian/alternc.dirs vendored
View File

@ -11,7 +11,7 @@ etc/postfix
etc/sudoers.d
usr/bin
usr/lib/alternc
usr/lib/alternc/panel
usr/share/alternc/panel
usr/lib/alternc/install.d
usr/sbin
usr/share/alternc/install

28
debian/rules vendored
View File

@ -48,22 +48,22 @@ install: build
# Install
cp -r etc/* debian/alternc/etc
cp -r install/* debian/alternc/usr/share/alternc/install
test -d debian/alternc/usr/lib/alternc/panel || mkdir debian/alternc/usr/lib/alternc/panel
cp -r bureau/* debian/alternc/usr/lib/alternc/panel
test -d debian/alternc/usr/share/alternc/panel || mkdir debian/alternc/usr/share/alternc/panel
cp -r bureau/* debian/alternc/usr/share/alternc/panel
(cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc)
# we don't use the full VERSION intepreted but only what's in the changelog
sed -i -e "s/@@REPLACED_DURING_BUILD@@/${MAJOR}/" debian/alternc/usr/lib/alternc/panel/class/local.php
echo ${VERSION} > debian/alternc/usr/lib/alternc/panel/class/.svn-infos
sed -i -e "s/@@REPLACED_DURING_BUILD@@/${MAJOR}/" debian/alternc/usr/share/alternc/panel/class/local.php
echo ${VERSION} > debian/alternc/usr/share/alternc/panel/class/.svn-infos
# Fix permisions
chmod 755 debian/alternc/etc/alternc
chmod 644 debian/alternc/etc/alternc/phpmyadmin.inc.php
# Group and user 1999 reference alterncpanel
chown -R 1999:1999 debian/alternc/usr/lib/alternc/panel
chown -R 1999:1999 debian/alternc/usr/share/alternc/panel
chmod 1733 debian/alternc/var/alternc/sessions
chmod -R 644 debian/alternc/usr/lib/alternc/panel
chmod -R a+X debian/alternc/usr/lib/alternc/panel
chmod -R 644 debian/alternc/usr/share/alternc/panel
chmod -R a+X debian/alternc/usr/share/alternc/panel
chown -R www-data:www-data debian/alternc/var/log/alternc debian/alternc/var/alternc/tmp
chmod a+x debian/alternc/usr/share/alternc/install/alternc.install debian/alternc/usr/share/alternc/install/dopo.sh debian/alternc/usr/share/alternc/install/mysql.sh debian/alternc/usr/share/alternc/install/newone.php debian/alternc/usr/share/alternc/install/reset_root.php debian/alternc/usr/share/alternc/install/upgrade_check.sh debian/alternc/usr/share/alternc/install/upgrades/*.php debian/alternc/usr/share/alternc/install/upgrades/*.sh
@ -84,7 +84,7 @@ install: build
install -m 644 po/fr/LC_MESSAGES/alternc-admintools.mo debian/alternc/usr/share/locale/fr/LC_MESSAGES/
# Remove helpers files from l18n dir
find debian/alternc/usr/lib/alternc/panel/locales/ \
find debian/alternc/usr/share/alternc/panel/locales/ \
-maxdepth 1 -type f -exec rm -f {} \;
# Remove CVS directories
/usr/bin/find debian/alternc -depth -type d -name CVS -exec rm {} -rf \;
@ -106,14 +106,14 @@ install: build
cd ..
# Copy the desk files
cp -r awstats/bureau debian/alternc-awstats/usr/lib/alternc/panel
find debian/alternc-awstats/usr/lib/alternc/panel/ -depth -iname ".svn" -exec rm -rf "{}" \;
rm -f debian/alternc-awstats/usr/lib/alternc/panel/locales/Makefile
cp -r awstats/bureau debian/alternc-awstats/usr/share/alternc/panel
find debian/alternc-awstats/usr/share/alternc/panel/ -depth -iname ".svn" -exec rm -rf "{}" \;
rm -f debian/alternc-awstats/usr/share/alternc/panel/locales/Makefile
# Fix permisions
chown -R root:www-data debian/alternc-awstats/usr/lib/alternc/panel
chmod -R 644 debian/alternc-awstats/usr/lib/alternc/panel
chmod -R a+X debian/alternc-awstats/usr/lib/alternc/panel
chown -R root:www-data debian/alternc-awstats/usr/share/alternc/panel
chmod -R 644 debian/alternc-awstats/usr/share/alternc/panel
chmod -R a+X debian/alternc-awstats/usr/share/alternc/panel
touch debian/alternc-awstats/var/cache/awstats/.placeholder
chown www-data:www-data debian/alternc-awstats/var/cache/awstats
chmod 755 debian/alternc-awstats/var/cache/awstats

View File

@ -23,7 +23,7 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
AddHandler cgi-script .cgi
</Directory>
<Directory /usr/lib/alternc/panel/admin/>
<Directory /usr/share/alternc/panel/admin/>
Order allow,deny
Allow from all
@ -31,7 +31,7 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
php_admin_flag safe_mode off
AddDefaultCharset UTF-8
# open_basedir allows access to specifics directories. We need to grant access to these directories for alternc, awstats, mailman...
php_admin_value open_basedir /usr/share/alternc-mailman/patches/:/etc/alternc/:/var/run/alternc/:/usr/lib/alternc/panel/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/:/etc/locale.gen:/var/log/alternc/bureau.log:/var/log/alternc/update_domains.log:/var/alternc/logs/:/etc/awstats/
php_admin_value open_basedir /usr/share/alternc-mailman/patches/:/etc/alternc/:/var/run/alternc/:/usr/share/alternc/panel/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/:/etc/locale.gen:/var/log/alternc/bureau.log:/var/log/alternc/update_domains.log:/var/alternc/logs/:/etc/awstats/
</Directory>

View File

@ -14,7 +14,7 @@
* /etc/phpmyadmin/config.inc.php
*/
include_once('/usr/lib/alternc/panel/class/local.php');
include_once('/usr/share/alternc/panel/class/local.php');
$cfg['SuhosinDisableWarning'] = true;
$cfg['ShowCreateDb'] = false;
$cfg['ShowChgPassword'] = false;

View File

@ -2,7 +2,7 @@
AssignUserId alterncpanel alterncpanel
SetEnv LOGIN "0000-panel"
DocumentRoot /usr/lib/alternc/panel/admin
DocumentRoot /usr/share/alternc/panel/admin
ServerName %%fqdn%%
RewriteEngine on
RewriteRule ^/admin/(.*) /$1 [R=301,L]

View File

@ -1,5 +1,5 @@
<VirtualHost *:80>
DocumentRoot /usr/lib/alternc/panel/admin
DocumentRoot /usr/share/alternc/panel/admin
AssignUserId alterncpanel alterncpanel
SetEnv LOGIN "%%UID%%-%%LOGIN%%"
ServerName %%fqdn%%

View File

@ -30,8 +30,8 @@
*/
// Ne vérifie pas ma session :)
chdir("/usr/lib/alternc/panel/");
require("/usr/lib/alternc/panel/class/config_nochk.php");
chdir("/usr/share/alternc/panel/");
require("/usr/share/alternc/panel/class/config_nochk.php");
// On passe super-admin
$admin->enabled=1;

View File

@ -27,6 +27,6 @@ install:
# domaintype template:
install -m 644 templates/apache2/squirrelmail.conf $(DESTDIR)/etc/alternc/templates/apache2/squirrelmail.conf
# Desktop files
install -o 1999 -g 1999 -m 644 class/m_squirrelmail.php $(DESTDIR)/usr/lib/alternc/panel/class/
install -o 1999 -g 1999 -m 644 class/m_squirrelmail.php $(DESTDIR)/usr/share/alternc/panel/class/
# Squirrelmail Change Password Plugin
install -m 644 alternc_changepass/setup.php alternc_changepass/change.php $(DESTDIR)/usr/share/squirrelmail/plugins/alternc_changepass/

View File

@ -6,7 +6,7 @@
echo "Connecting to AlternC MySQL database... "; flush();
define('NOCHECK', 1);
require_once("/usr/lib/alternc/panel/class/config.php");
require_once("/usr/share/alternc/panel/class/config.php");
echo "done.\n";
echo "------------------------------------------------------------\n";

View File

@ -7,7 +7,7 @@ if (empty($mail_id) ) {
die('You must specified a valid mail id (integer)');
}
require_once("/usr/lib/alternc/panel/class/config_nochk.php");
require_once("/usr/share/alternc/panel/class/config_nochk.php");
// Wich account should I be ?
$uid=$mail->get_account_by_mail_id($mail_id);

View File

@ -364,7 +364,7 @@ $aactions=array(
/* ----------------------------------------------------------------- */
// CONFIGURATION :
include_once('/usr/lib/alternc/panel/class/local.php');
include_once('/usr/share/alternc/panel/class/local.php');
$ROOT=$L_ALTERNC_MAIL;
$SIEVEROOT="/var/lib/dovecot/sieve";

View File

@ -17,7 +17,7 @@ if ($argc!=2) {
$name=$argv[1];
include("/usr/lib/alternc/panel/class/local.php");
include("/usr/share/alternc/panel/class/local.php");
if (!mysql_connect($L_MYSQL_HOST,$L_MYSQL_LOGIN,$L_MYSQL_PWD)) {
echo "Cannot connect to Mysql !\n";

View File

@ -21,7 +21,7 @@ if ($argc!=3) {
$name=$argv[1];
$quota=$argv[2];
include("/usr/lib/alternc/panel/class/local.php");
include("/usr/share/alternc/panel/class/local.php");
if (!mysql_connect($L_MYSQL_HOST,$L_MYSQL_LOGIN,$L_MYSQL_PWD)) {
echo "Cannot connect to Mysql !\n";

View File

@ -1,7 +1,7 @@
#!/usr/bin/php -q
<?php
require_once("/usr/lib/alternc/panel/class/config_nochk.php");
require_once("/usr/share/alternc/panel/class/config_nochk.php");
// On déverrouile le bureau AlternC :)
@alternc_shutdown();