Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1004 → Rev 1005

/conf/havp-init
12,9 → 12,6
# description: starts HAVP the High Availability Antivirus Proxy
#
 
 
 
 
. /etc/init.d/functions
HAVP_BIN=/usr/sbin/havp
HAVP_CONFIG=/etc/havp/havp.config
70,21 → 67,25
 
case "$1" in
start)
if ! [ "`mount | grep ^$havp_loopback`" ]; then
if ! [ "`mount | grep $havp_mountpoint`" ]; then
echo -n "Mounting $havp_loopback under $havp_mountpoint ..."
mount -t tmpfs -o mand,noatime,size=50m,nosuid,noexec $havp_loopback $havp_mountpoint
chown -R havp:havp $havp_mountpoint
echo "done"
fi
echo -n "Cleaning up $havp_mountpoint"...
find $havp_mountpoint/ -type f -delete
echo " done"
echo -n "Starting $DESC: "
if [ ! -f $HAVP_BIN ]; then
echo "Error: $HAVP_BIN not found"
exit 5
if [ "`mount | grep $havp_mountpoint`" ]; then
echo -n "Cleaning up $havp_mountpoint"...
find $havp_mountpoint/ -type f -delete
echo " done"
echo -n "Starting $DESC: "
if [ ! -f $HAVP_BIN ]; then
echo "Error: $HAVP_BIN not found"
exit 5
fi
$HAVP_BIN -c $HAVP_CONFIG
else
echo "Error: mount tmpfs point failed"
fi
$HAVP_BIN -c $HAVP_CONFIG
exit $?
;;
 
105,11 → 106,10
echo "Error: HAVP not running or PIDFILE unreadable"
exit 1
fi
echo -n "Cleaning up $havp_mountpoint"...
find $havp_mountpoint/ -type f -delete
echo " done"
if [ x"$USE_LOOPBACK" = x"true" ] && [ "`mount | grep ^$havp_loopback`" ]; then
if [ "`mount | grep $havp_mountpoint`" ]; then
echo -n "Cleaning up $havp_mountpoint"...
find $havp_mountpoint/ -type f -delete
echo " done"
echo -n "Unmounting $havp_mountpoint ..."
umount $havp_mountpoint
echo "done"