From 6f1dc4091923f9543c2bb1c4185774fd1d5de4db Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Mon, 18 Feb 2013 14:55:42 +0000 Subject: [PATCH] =?UTF-8?q?Le=20panel=20est=20rang=C3=A9=20dans=20/usr/sha?= =?UTF-8?q?re/alternc/panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEBIAN_COMPLIANCE | 2 +- bureau/class/config.php | 2 +- debian/alternc-awstats.dirs | 10 ++++---- debian/alternc-squirrelmail.dirs | 2 +- debian/alternc.dirs | 2 +- debian/rules | 28 +++++++++++------------ etc/alternc/apache2.conf | 4 ++-- etc/alternc/phpmyadmin.inc.php | 2 +- etc/alternc/templates/alternc/bureau.conf | 2 +- etc/alternc/templates/apache2/panel.conf | 2 +- install/reset_root.php | 4 ++-- squirrelmail/Makefile | 2 +- src/alternc-check | 2 +- src/mail_dodelete.php | 2 +- src/procmail_to_sieve.php | 2 +- src/quota_delete | 2 +- src/quota_init | 2 +- src/spoolsize.php | 2 +- 18 files changed, 37 insertions(+), 37 deletions(-) diff --git a/DEBIAN_COMPLIANCE b/DEBIAN_COMPLIANCE index e2049e27..0563f632 100644 --- a/DEBIAN_COMPLIANCE +++ b/DEBIAN_COMPLIANCE @@ -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] diff --git a/bureau/class/config.php b/bureau/class/config.php index 6baac9ea..f75de85e 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -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 : */ diff --git a/debian/alternc-awstats.dirs b/debian/alternc-awstats.dirs index 14240217..c228d440 100644 --- a/debian/alternc-awstats.dirs +++ b/debian/alternc-awstats.dirs @@ -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 diff --git a/debian/alternc-squirrelmail.dirs b/debian/alternc-squirrelmail.dirs index 48b70254..c9905bbf 100644 --- a/debian/alternc-squirrelmail.dirs +++ b/debian/alternc-squirrelmail.dirs @@ -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 diff --git a/debian/alternc.dirs b/debian/alternc.dirs index df073ec7..06d3d570 100644 --- a/debian/alternc.dirs +++ b/debian/alternc.dirs @@ -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 diff --git a/debian/rules b/debian/rules index 29cce28a..ba652baa 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/etc/alternc/apache2.conf b/etc/alternc/apache2.conf index 410f226e..a9e56e1d 100644 --- a/etc/alternc/apache2.conf +++ b/etc/alternc/apache2.conf @@ -23,7 +23,7 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/ AddHandler cgi-script .cgi - + 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/ diff --git a/etc/alternc/phpmyadmin.inc.php b/etc/alternc/phpmyadmin.inc.php index 9333faed..9f95a31f 100644 --- a/etc/alternc/phpmyadmin.inc.php +++ b/etc/alternc/phpmyadmin.inc.php @@ -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; diff --git a/etc/alternc/templates/alternc/bureau.conf b/etc/alternc/templates/alternc/bureau.conf index 2f94f615..fb00b8cd 100644 --- a/etc/alternc/templates/alternc/bureau.conf +++ b/etc/alternc/templates/alternc/bureau.conf @@ -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] diff --git a/etc/alternc/templates/apache2/panel.conf b/etc/alternc/templates/apache2/panel.conf index 676fabdc..d3540537 100644 --- a/etc/alternc/templates/apache2/panel.conf +++ b/etc/alternc/templates/apache2/panel.conf @@ -1,5 +1,5 @@ - DocumentRoot /usr/lib/alternc/panel/admin + DocumentRoot /usr/share/alternc/panel/admin AssignUserId alterncpanel alterncpanel SetEnv LOGIN "%%UID%%-%%LOGIN%%" ServerName %%fqdn%% diff --git a/install/reset_root.php b/install/reset_root.php index 121883a3..a23c97a9 100644 --- a/install/reset_root.php +++ b/install/reset_root.php @@ -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; diff --git a/squirrelmail/Makefile b/squirrelmail/Makefile index fb82a6fc..6ac58761 100644 --- a/squirrelmail/Makefile +++ b/squirrelmail/Makefile @@ -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/ diff --git a/src/alternc-check b/src/alternc-check index 08e060b7..41ed8533 100755 --- a/src/alternc-check +++ b/src/alternc-check @@ -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"; diff --git a/src/mail_dodelete.php b/src/mail_dodelete.php index 6fcfbad4..12177108 100644 --- a/src/mail_dodelete.php +++ b/src/mail_dodelete.php @@ -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); diff --git a/src/procmail_to_sieve.php b/src/procmail_to_sieve.php index 0b0981f0..b894392d 100755 --- a/src/procmail_to_sieve.php +++ b/src/procmail_to_sieve.php @@ -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"; diff --git a/src/quota_delete b/src/quota_delete index a4502d30..df6bf7d6 100644 --- a/src/quota_delete +++ b/src/quota_delete @@ -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"; diff --git a/src/quota_init b/src/quota_init index b34b4e20..8279109e 100644 --- a/src/quota_init +++ b/src/quota_init @@ -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"; diff --git a/src/spoolsize.php b/src/spoolsize.php index e91cebec..4d8c80c5 100644 --- a/src/spoolsize.php +++ b/src/spoolsize.php @@ -1,7 +1,7 @@ #!/usr/bin/php -q