added rc script

This commit is contained in:
SJ 2012-02-14 20:16:05 +01:00
parent cfb7b80120
commit bc60990c22
17 changed files with 154 additions and 27 deletions

5
configure vendored
View File

@ -3423,7 +3423,7 @@ os=`uname -s`
id_bin="id"
SUBDIRS="src etc util"
SUBDIRS="src etc util init.d"
@ -4153,7 +4153,7 @@ CFLAGS="$static -O2 -Wall -g"
LIBS="$antispam_libs $sunos_libs "
OBJS="dirs.o misc.o counters.o cfg.o sig.o decoder.o list.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o $objs"
ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile"
ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -4862,6 +4862,7 @@ do
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
"util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
"init.d/Makefile") CONFIG_FILES="$CONFIG_FILES init.d/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac

View File

@ -51,7 +51,7 @@ os=`uname -s`
id_bin="id"
dnl SUBDIRS="src etc util perl init.d templates history contrib/stat"
SUBDIRS="src etc util"
SUBDIRS="src etc util init.d"
dnl static build
@ -276,6 +276,6 @@ CFLAGS="$static -O2 -Wall -g"
LIBS="$antispam_libs $sunos_libs "
OBJS="dirs.o misc.o counters.o cfg.o sig.o decoder.o list.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o $objs"
AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile])
AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile])
AC_OUTPUT

35
init.d/Makefile.in Normal file
View File

@ -0,0 +1,35 @@
SHELL = @SHELL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
includedir = @includedir@
libdir = @libdir@
libexecdir = @libexecdir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
mandir = @mandir@
datarootdir = @datarootdir@
localstatedir = @localstatedir@
CC = @CC@
CFLAGS = @CFLAGS@ @CPPFLAGS@
DEFS = @defs@
INCDIR = -I. -I../.. -I../../src @INCDIR@ @sql_includes@
LIBDIR = -L. @LIBDIR@ @LDFLAGS@ -L../../src
LIBS = @LIBS@ @sql_libs@
INSTALL = @INSTALL@
all:
sed -e "s%SBINDIR%$(sbindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.piler.in > $(srcdir)/rc.piler
install:
clean:
rm -f rc.piler
distclean: clean
rm -f Makefile

50
init.d/rc.piler.in Normal file
View File

@ -0,0 +1,50 @@
#!/bin/sh
##
##
NAME=piler
PID_FILE=`SBINDIR/pilerconf -q pidfile | cut -f2 -d=`
PID_NUMBER=`test -f ${PID_FILE} && cat ${PID_FILE}`
start() {
echo "starting piler . . ."
SBINDIR/piler -d
}
stop() {
echo "stopping piler"
killall ${NAME}
}
check_status(){
test -f /proc/${PID_NUMBER}/status
}
case "$1" in
start)
start;
;;
stop)
stop;
;;
status)
if check_status;
then
echo "${NAME} is running."
else
echo "${NAME} is not running."
fi
;;
restart)
stop;
sleep 1;
start;
;;
*)
echo "Usage: $0 start|stop|restart|status"
esac

View File

@ -1,3 +1,4 @@
RewriteEngine On
RewriteRule ^search.php /index.php?route=search/search&type=simple [L]
RewriteRule ^advanced.php /index.php?route=search/search&type=advanced [L]
@ -6,4 +7,6 @@ RewriteRule ^search-helper.php /index.php?route=search/helper [L]
RewriteRule ^audit-helper.php /index.php?route=audit/helper [L]
RewriteRule ^message.php /index.php?route=message/view [L]
RewriteRule ^settings.php /index.php?route=user/settings [L]
RewriteRule ^login.php /index.php?route=login/login [L]
RewriteRule ^logout.php /index.php?route=login/logout [L]

View File

@ -29,13 +29,13 @@ class ControllerLoginLogin extends Controller {
LOGGER('logged in');
/*if(isset($_POST['relocation']) && $_POST['relocation']) {
header("Location: " . SITE_URL . "index.php?" . $_POST['relocation']);
if(isset($_POST['relocation']) && $_POST['relocation']) {
header("Location: " . SITE_URL . $_POST['relocation']);
} else {
header("Location: " . SITE_URL . "search.php");
}*/
}
header("Location: " . SITE_URL . "search.php");
//header("Location: " . SITE_URL . "search.php");
exit;
}

View File

@ -14,17 +14,21 @@ class ControllerSearchSearch extends Controller {
$this->load->model('search/search');
$this->document->title = $this->data['text_simple_search'];
$this->data['searchtype'] = 'simple';
if(isset($this->request->get['type'])) {
if($this->request->get['type'] == 'advanced') {
$this->template = "search/advanced.tpl";
$this->data['searchtype'] = 'advanced';
$this->document->title = $this->data['text_advanced_search'];
}
if($this->request->get['type'] == 'expert') {
$this->template = "search/expert.tpl";
$this->data['searchtype'] = 'expert';
$this->document->title = $this->data['text_expert_search'];
}
}

View File

@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "Add new user";
$_['text_add_policy'] = "Add new policy";
$_['text_administration'] = "Administration";
$_['text_admin_user'] = "Admin user";
$_['text_advanced'] = "Advanced";
$_['text_advanced_search'] = "Advanced search";
$_['text_all'] = "all";
$_['text_any'] = "any";
@ -82,6 +83,8 @@ $_['text_existing_policies'] = "Existing policies";
$_['text_existing_rules'] = "Existing rules";
$_['text_existing_user'] = "Existing user";
$_['text_existing_users'] = "Existing users";
$_['text_expert'] = "Expert";
$_['text_expert_search'] = "Expert search";
$_['text_failed'] = "failed";
$_['text_failed_to_add'] = "Failed to add";
@ -231,6 +234,8 @@ $_['text_server_name'] = "Server name";
$_['text_server_operating_system'] = "Operating System";
$_['text_set'] = "Set";
$_['text_settings'] = "Settings";
$_['text_simple'] = "Simple";
$_['text_simple_search'] = "Simple search";
$_['text_size'] = "Size";
$_['text_smtp_status'] = "SMTP status";
$_['text_statistics'] = "Statistics";

View File

@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "
$_['text_add_policy'] = "Új házirend";
$_['text_administration'] = "Adminisztráció";
$_['text_admin_user'] = "Admin felhasználó";
$_['text_advanced'] = "Összetett";
$_['text_advanced_search'] = "Összetett keresés";
$_['text_all'] = "összes";
$_['text_any'] = "mindegy";
@ -82,6 +83,8 @@ $_['text_existing_policies'] = "L
$_['text_existing_rules'] = "Létező szabályok";
$_['text_existing_user'] = "Létező felhasználó";
$_['text_existing_users'] = "Létező felhasználók";
$_['text_expert'] = "Haladó";
$_['text_expert_search'] = "Haladó keresés";
$_['text_failed'] = "sikertelen";
$_['text_failed_to_add'] = "Hiba a hozzáadás során";
@ -232,6 +235,8 @@ $_['text_server_name'] = "Szerver n
$_['text_server_operating_system'] = "Operációs rendszer";
$_['text_set'] = "Beállít";
$_['text_settings'] = "Beállítások";
$_['text_simple'] = "Egyszerű";
$_['text_simple_search'] = "Egyszerű keresés";
$_['text_size'] = "Méret";
$_['text_smtp_status'] = "SMTP státusz";
$_['text_statistics'] = "Statisztika";

View File

@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "Új felhasználó";
$_['text_add_policy'] = "Új házirend";
$_['text_administration'] = "Adminisztráció";
$_['text_admin_user'] = "Admin felhasználó";
$_['text_advanced'] = "Összetett";
$_['text_advanced_search'] = "Összetett keresés";
$_['text_all'] = "összes";
$_['text_any'] = "mindegy";
@ -82,6 +83,8 @@ $_['text_existing_policies'] = "Létező házirendek";
$_['text_existing_rules'] = "Létező szabályok";
$_['text_existing_user'] = "Létező felhasználó";
$_['text_existing_users'] = "Létező felhasználók";
$_['text_expert'] = "Haladó";
$_['text_expert_search'] = "Haladó keresés";
$_['text_failed'] = "sikertelen";
$_['text_failed_to_add'] = "Hiba a hozzáadás során";
@ -232,6 +235,8 @@ $_['text_server_name'] = "Szerver név";
$_['text_server_operating_system'] = "Operációs rendszer";
$_['text_set'] = "Beállít";
$_['text_settings'] = "Beállítások";
$_['text_simple'] = "Egyszerű";
$_['text_simple_search'] = "Egyszerű keresés";
$_['text_size'] = "Méret";
$_['text_smtp_status'] = "SMTP státusz";
$_['text_statistics'] = "Statisztika";

View File

@ -132,7 +132,7 @@
input[type=button].secondary { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 24%;}
input[type=button].advsecondary { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 15%;}
input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 16%;}
input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 17%;}
input[type=button].short { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 50px;}
input[type=checkbox].attachmenttype { margin: 0; vertical-align: middle; }
@ -152,14 +152,18 @@
* dropdown menu
*/
.mcell { display: table-cell; font: normal 12px Arial, sans-serif; vertical-align: top; }
ul.dropdown { position: relative; }
ul.dropdown li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding-right: 40px; padding-left: 40px; border: 0px solid red; }
ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; }
ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; }
ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding-right: 0; margin-left: 10px; }
ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; padding-right: 5px; }
ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; }
ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding: 0; }
ul.dropdown li.admin { font-weight: bold; float: left; background: #ffffff; padding-right: 5px; padding-left: 2px; }
ul.dropdown li.first_li_admin { background: #ffffff; text-align: left; margin-left: 80px; padding-left: 0px; padding-right: 5px; }
ul.dropdown li.first_li_admin { background: #ffffff; text-align: left; margin-left: 90px; padding-left: 0px; padding-right: 5px; }
ul.dropdown li.last_li_admin { background: #ffffff; text-align: right; padding: 0; }
ul.dropdown li.logout { font-weight: bold; float: right; background: #ffffff; width: 100px; text-align: right; }
@ -169,6 +173,7 @@
ul.dropdown li a { padding: 0; color: #222; border-bottom: none; }
ul.dropdown li.hover,
ul.dropdown li:hover { background: #F3D673; color: black; position: relative; }
ul.dropdown li.no_search_li:hover { background: #ffffff; color: black; position: relative; }
ul.dropdown li.hover a { color: black; }
ul.dropdown ul { width: 150px; text-align: left; visibility: hidden; position: absolute; top: 100%; left: 0; }

View File

@ -31,7 +31,7 @@
<div class="rightcell">
<div class="logout22">
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="index.php?route=login/logout"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="logout.php"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
</div>
</div>

View File

@ -3,16 +3,30 @@
<div class="row">
<div class="leftcell">
<ul class="dropdown">
<li class="first_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_search; ?></a></li>
<li class="center_li"><a href="advanced.php"<?php if(strstr($_SERVER['REQUEST_URI'], "advanced.php")){ ?> id="active"<?php } ?>><?php print $text_advanced_search; ?></a></li>
<li class="last_li"><a href="settings.php"<?php if(strstr($_SERVER['REQUEST_URI'], "settings.php")){ ?> id="active"<?php } ?>><?php print $text_settings; ?></a></li>
</ul>
<div id="ss1">
<div class="row">
<div class="mcell" style="width: 80px;">
</div>
<div class="mcell" style="width: 315px;">
<ul class="dropdown">
<li class="search_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_simple_search; ?></a></li>
<li class="search_li"><a href="advanced.php"<?php if(strstr($_SERVER['REQUEST_URI'], "advanced.php")){ ?> id="active"<?php } ?>><?php print $text_advanced_search; ?></a></li>
</ul>
</div>
<div class="mcell" style="width: 95px;">
<ul class="dropdown">
<li class="last_li" style="text-align: right; float: right;"><a href="settings.php"<?php if(strstr($_SERVER['REQUEST_URI'], "settings.php")){ ?> id="active"<?php } ?>><?php print $text_settings; ?></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="rightcell">
<div class="logout22">
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="index.php?route=login/logout"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="logout.php"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
</div>
</div>

View File

@ -1,7 +1,7 @@
<?php if(!isset($_SESSION['username'])){ ?>
<form name="login" action="index.php?route=login/login" method="post">
<input type="hidden" name="relocation" value="<?php if(isset($_GET['route']) && !preg_match("/^login/", $_GET['route']) ) { print $_SERVER['QUERY_STRING']; } ?>" />
<form name="login" action="login.php" method="post">
<input type="hidden" name="relocation" value="<?php if(isset($_GET['route']) && !preg_match("/^login/", $_GET['route']) ) { if(isset($_SERVER['REDIRECT_URL'])) { print $_SERVER['REDIRECT_URL']; } else { print $_SERVER['QUERY_STRING']; } } ?>" />
<div id="search">

View File

@ -1,5 +1,5 @@
<p>
<?php print $text_logged_out; ?>. <a href="index.php?route=login/login" class="messagelink"><?php print $text_back; ?></a>
<?php print $text_logged_out; ?>. <a href="login.php" class="messagelink"><?php print $text_back; ?></a>
</p>

View File

@ -101,7 +101,7 @@
</div>
<div id="search2">
<div id="A1"></div>
<div id="A1"><a href="expert.php"><?php print $text_expert_search; ?></a></div>
</div>
</div>

View File

@ -2,7 +2,7 @@
<div id="search">
<div id="search1">
<div id="ss1" style="border: 0px solid red;">
<div id="ss1">
<input type="hidden" name="searchtype" id="searchtype" value="expert" />
@ -13,9 +13,9 @@
</div>
<div id="ss1" style="border: 0px solid blue;">
<div id="ss1">
<div class="row">
<div class="cell1s"><?php print $text_search_terms; ?>: </div>
<div class="cell1s" style="width: 75px;"><?php print $text_search; ?>: </div>
<div class="cell2"><input type="text" id="_search" name="_search" class="advtext" style="width: 100%;" value="<?php if(isset($_search)) { print $_search; } ?>" /></div>
</div>
</div>