Permalink
Browse files

Fixed on init scripts and watchdog

  • Loading branch information...
1 parent 1e91c5f commit 70832ae6ec9eec36cf9e8c274fc74f37ac1fa7c3 @hkerem hkerem committed Jun 5, 2012
Showing with 17 additions and 7 deletions.
  1. +11 −4 debian/mydlp.init
  2. +6 −3 src/script/mydlp-watchdog
View
15 debian/mydlp.init
@@ -212,7 +212,7 @@ start_jetty() {
return 0;
fi
echo " * Starting Jetty..."
- $SERV start > /dev/null
+ $SERV jetty start > /dev/null
if is_tables_initialized ; then
true
else
@@ -265,7 +265,6 @@ ensure_squid() {
if [ -n "$NOSQUID" -a "$NOSQUID" == "true" ]; then
return 0;
fi
- wait_for_smtp_cf
is_squid_alive || $SERV squid3 start
}
@@ -300,7 +299,15 @@ ensure_apache() {
if [ -n "$NOJETTY" -a "$NOJETTY" == "true" ]; then
return 0;
fi
- is_apache_alive || $SERV apache2 start
+ is_apache_alive || start_apache
+}
+
+start_apache() {
+ if [ -n "$NOJETTY" -a "$NOJETTY" == "true" ]; then
+ return 0;
+ fi
+ echo " * Starting Apache..."
+ $SERV apache2 start 2>&1 > /dev/null
}
is_apache_alive() {
@@ -314,7 +321,7 @@ stop_apache() {
if [ -n "$NOJETTY" -a "$NOJETTY" == "true" ]; then
return 0;
fi
- $SERV apache2 stop
+ $SERV apache2 stop 2>&1 > /dev/null
}
case "$1" in
View
9 src/script/mydlp-watchdog
@@ -136,9 +136,12 @@ function startMyDLP {
$INITSCRIPT start > /dev/null 2>&1
waitForIcap
echo "Started MyDLP."
- echo "Reconfiguring Squid..."
- squid3 -k reconfigure
- echo "Flushing Postfix Mail Queue..."
+ if [ -n "$NOPOSTFIX" -a "$NOPOSTFIX" == "true" ]; then
+ true
+ else
+ echo "Reconfiguring Squid..."
+ squid3 -k reconfigure
+ fi
}
function stopPostfix {

0 comments on commit 70832ae

Please sign in to comment.