From 7193299b2407a4ff6cea4c25a217857ace27f1e7 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 19 Jul 2004 17:49:09 +0000 Subject: Miscellaneous fixes (lost track). --- scripts/clamsmtpd.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 scripts/clamsmtpd.sh (limited to 'scripts') diff --git a/scripts/clamsmtpd.sh b/scripts/clamsmtpd.sh new file mode 100644 index 0000000..c574e8b --- /dev/null +++ b/scripts/clamsmtpd.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +########################################################################### +# CONFIGURATION + +# The outgoing SMTP server (CHANGE THIS) +smtp=mysmtp.com:25 + +# Directory for temporary files (CHANGE THIS) +tmpdir=/var/tmp + +# The user to run as +user=clamav + +# The prefix clamsmtpd was installed to +prefix=/usr/local/ + +# The location for pid file +piddir=/var/run/clamav/ + +# The clamd socket +clamsock=/var/run/clamav/clamd + + +########################################################################### +# SCRIPT + +case $1 in +start) + mkdir -p $piddir + chown $user $piddir + su -m $user -c "$prefix/sbin/clamsmtpd -c $clamsock -D $tmpdir -p $piddir/clamsmtpd.pid $smtp" + echo -n "clam-smtpd " + ;; +stop) + [ -f $piddir/clamsmtpd.pid ] && kill `cat $piddir/clamsmtpd.pid` + echo -n "clam-smtpd " + ;; +*) + echo "usage: clamsmptd.sh {start|stop}" >&2 + ;; +esac -- cgit v1.2.3