pilergetd fixes

This commit is contained in:
SJ 2013-04-09 16:10:08 +02:00
parent 163ebb7c46
commit 07c8a15400
6 changed files with 57 additions and 6 deletions

View File

@ -24,13 +24,14 @@ INSTALL = @INSTALL@
all:
sed -e "s%SBINDIR%$(sbindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.piler.in > $(srcdir)/rc.piler
sed -e "s%SBINDIR%$(sbindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.pilergetd.in > $(srcdir)/rc.pilergetd
sed -e "s%BINDIR%$(bindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.searchd.in > $(srcdir)/rc.searchd
install:
clean:
rm -f rc.piler rc.searchd
rm -f rc.piler rc.pilergetd rc.searchd
distclean: clean
rm -f Makefile

View File

@ -7,12 +7,12 @@ PID_FILE=`SBINDIR/pilerconf -q pidfile | cut -f2 -d=`
PID_NUMBER=`test -f ${PID_FILE} && cat ${PID_FILE}`
start() {
echo "starting piler . . ."
echo "starting $NAME . . ."
SBINDIR/piler -d
}
stop() {
echo "stopping piler"
echo "stopping $NAME"
kill ${PID_NUMBER}
}

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

@ -0,0 +1,50 @@
#!/bin/sh
##
##
NAME=pilergetd
PID_FILE=`SBINDIR/pilerconf -q pilergetd_pidfile | cut -f2 -d=`
PID_NUMBER=`test -f ${PID_FILE} && cat ${PID_FILE}`
start() {
echo "starting $NAME . . ."
SBINDIR/pilergetd -d
}
stop() {
echo "stopping $NAME"
kill ${PID_NUMBER}
}
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

@ -14,7 +14,7 @@
#define VERSION "0.1.24-master-branch"
#define BUILD 791
#define BUILD 792
#define HOSTID "mailarchiver"

View File

@ -188,7 +188,7 @@ int handle_pilerget_request(int new_sd, struct __data *data, struct __config *cf
trimBuffer(puf);
q = &muf[0];
if(strcmp(&puf[5], cfg->pilergetd_password))
if(strcmp(&puf[5], cfg->pilergetd_password)){
snprintf(resp, sizeof(resp)-1, "550 AUTH FAILED\r\n");
}
else {

View File

@ -132,7 +132,7 @@
<input type="hidden" id="tag_keys" name="tag_keys" value="<?php print $all_ids; ?>" />
<input type="hidden" id="_ref" name="_ref" value="<?php if(isset($_ref)) { print $_ref; } ?>" />
<span id="tagbox" class="input-prepend input-append">
<span class="add-on"><i class="icon-tags icon-large" title="Tag"></i>&nbsp;<?php print $text_tag_search_results; ?>:</span>
<span class="add-on"><i class="icon-tags icon-large" title="Tag"></i>&nbsp;<?php print $text_tag_selected_messages; ?>:</span>
<input type="text" id="tag_value" name="tag_value" class="tagtext" />
<input type="button" class="btn btn-info" onclick="Piler.tag_search_results('<?php print $text_tagged; ?>');" value="Tag" />
</span>