From 2cc0dd65fcfb0fe7c5ea04cfcb65d86cb98785a4 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Sun, 29 Oct 2017 11:01:39 +0100 Subject: [PATCH] gui: move config-site.php to $sysconfdir/piler directory Signed-off-by: Janos SUTO --- configure | 25 +++---------------------- configure.in | 12 ++---------- webui/{config.php => config.php.in} | 2 +- 3 files changed, 6 insertions(+), 33 deletions(-) rename webui/{config.php => config.php.in} (99%) diff --git a/configure b/configure index 1698ca39..e33fc544 100755 --- a/configure +++ b/configure @@ -4635,17 +4635,6 @@ _ACEOF -cat >>confdefs.h <<_ACEOF -#define VIRUS_TEMPLATE "$my_prefix/share/clapf/template.virus" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define ZOMBIE_NET_REGEX "$my_prefix/share/clapf/zombienets.regex" -_ACEOF - - - if test "$have_mysql" = "no" && test "$have_psql" = "no"; then echo echo "please specify the used database with --with-database=..." @@ -4674,15 +4663,6 @@ $as_echo "#define HAVE_DAEMON 0" >>confdefs.h if test -x /usr/xpg4/bin/id; then id_bin="/usr/xpg4/bin/id"; fi fi -if test `echo $os | grep -c CYGWIN` -eq 1; then - defs="$defs -DCYGWIN" - -cat >>confdefs.h <<_ACEOF -#define ZOMBIE_NET_REGEX "zombienets.regex" -_ACEOF - -fi - if test "$have_clamd" = "yes" ; then defs="$defs -DHAVE_ANTIVIRUS" @@ -4880,7 +4860,7 @@ CFLAGS="$static -O2 -Wall -g" LIBS="$antispam_libs $sunos_libs " OBJS="dirs.o base64.o misc.o counters.o cfg.o sig.o decoder.o hash.o parser.o parser_utils.o rules.o smtp.o session.o bdat.o message.o attachment.o digest.o store.o archive.o tai.o import.o import_maildir.o import_mailbox.o import_pop3.o import_imap.o imap.o pop3.o extract.o mydomains.o $objs" -ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile unit_tests/Makefile contrib/imap/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile unit_tests/Makefile contrib/imap/Makefile webui/config.php" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -5580,6 +5560,7 @@ do "init.d/Makefile") CONFIG_FILES="$CONFIG_FILES init.d/Makefile" ;; "unit_tests/Makefile") CONFIG_FILES="$CONFIG_FILES unit_tests/Makefile" ;; "contrib/imap/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/imap/Makefile" ;; + "webui/config.php") CONFIG_FILES="$CONFIG_FILES webui/config.php" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -6204,6 +6185,6 @@ fi echo echo -echo "IMPORTANT! If you upgrade, be sure to read http://www.mailpiler.org/en/upgrade.html" +echo "IMPORTANT! If you upgrade, be sure to read http://www.mailpiler.org/wiki/current:upgrade" echo echo diff --git a/configure.in b/configure.in index 9cde7be0..ddcb68af 100644 --- a/configure.in +++ b/configure.in @@ -356,9 +356,6 @@ AC_SUBST(DATAROOTDIR) AC_DEFINE_UNQUOTED(DATAROOTDIR,"$dataroot_dir",[where to look for the share data files]) -AC_DEFINE_UNQUOTED(VIRUS_TEMPLATE, "$my_prefix/share/clapf/template.virus", [where the virus template is]) -AC_DEFINE_UNQUOTED(ZOMBIE_NET_REGEX, "$my_prefix/share/clapf/zombienets.regex", [where the virus template is]) - if test "$have_mysql" = "no" && test "$have_psql" = "no"; then echo @@ -387,11 +384,6 @@ if test "$os" = "SunOS"; then if test -x /usr/xpg4/bin/id; then id_bin="/usr/xpg4/bin/id"; fi fi -if test `echo $os | grep -c CYGWIN` -eq 1; then - defs="$defs -DCYGWIN" - AC_DEFINE_UNQUOTED(ZOMBIE_NET_REGEX, "zombienets.regex", [where the virus template is]) -fi - dnl whether we have antivirus support if test "$have_clamd" = "yes" ; then @@ -546,12 +538,12 @@ CFLAGS="$static -O2 -Wall -g" LIBS="$antispam_libs $sunos_libs " OBJS="dirs.o base64.o misc.o counters.o cfg.o sig.o decoder.o hash.o parser.o parser_utils.o rules.o smtp.o session.o bdat.o message.o attachment.o digest.o store.o archive.o tai.o import.o import_maildir.o import_mailbox.o import_pop3.o import_imap.o imap.o pop3.o extract.o mydomains.o $objs" -AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile unit_tests/Makefile contrib/imap/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile unit_tests/Makefile contrib/imap/Makefile webui/config.php]) AC_OUTPUT echo echo -echo "IMPORTANT! If you upgrade, be sure to read http://www.mailpiler.org/en/upgrade.html" +echo "IMPORTANT! If you upgrade, be sure to read http://www.mailpiler.org/wiki/current:upgrade" echo echo diff --git a/webui/config.php b/webui/config.php.in similarity index 99% rename from webui/config.php rename to webui/config.php.in index ca176fc8..4a3fa914 100644 --- a/webui/config.php +++ b/webui/config.php.in @@ -318,7 +318,7 @@ define('NOW', time()); * normally you don't have to change anything below */ -require_once 'config-site.php'; +require_once '@sysconfdir@/piler/config-site.php'; ini_set('session.cookie_lifetime', $config['SESSION_EXPIRY']);