#!/bin/sh # # Copyright (C) 2007 Astaro AG www.astaro.com # For license information look at /doc/astaro-license.txt # or http://www.astaro.com/doc/astaro-license.txt # # Maintainer: Tom Kistner # # ctasd This script starts and stops the ctasd daemon # # chkconfig: 2345 80 30 # # description: ctasd is a daemon process to check # email messages for SPAM. NOSELFM="/etc/no-selfmonitor/ctasd" # See how we were called. case "$1" in start) # Start daemon. echo -n "Starting ctasd: " cd /usr/lib/ctasd LD_LIBRARY_PATH=`pwd`:`pwd`/lib:$LD_LIBRARY_PATH ./ctasd -l /usr/lib/ctasd 2>/dev/null >/dev/null & RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/ctasd rm -f $NOSELFM touch /var/chroot-smtp/etc/exim.conf.includes/ctasd_ok ;; stop) # Stop daemons. echo -n "Shutting down ctasd: " rm -f /var/chroot-smtp/etc/exim.conf.includes/ctasd_ok touch $NOSELFM killproc ctasd RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/ctasd ;; restart) $0 stop $0 start ;; condrestart) [ -e /var/lock/subsys/ctasd ] && $0 restart ;; status) status ctasd ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart}" exit 1 esac exit 0