#!/bin/bash
# Configure the ntp service for the appliance
# (c) Network Associates 2002
#
option=${1}
if [ -f $NETAWSS/.profile.vars ]; then 
 . $NETAWSS/.profile.vars 
else 
 . /var/NAIENV/.profile.vars 
fi 
PATH=$wsPATH:$PATH
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

PATH=$wsPATH:$PATH
shopt -s extglob

appliance_start()
{
     # There should not be any webshield proxies running at this point
     killall -q -KILL ws_ftp ws_pop3 ws_ls ws_http ws_smtp ws_icap
     killall -q -KILL ws_ftp ws_pop3 ws_ls ws_http ws_smtp ws_icap

     # Remove any cleanable modules
     /sbin/rmmod -a

     # Tidy the /tmp directory
     /bin/rm -rf /tmp
     mkdir -m 777 /tmp
}

case $option in
(start) appliance_start ;;
(stop|restart|reload|status) : ;;
(*) echo $"Usage: $0 {start|stop|restart|reload|status}"; exit 1 ;;
esac

exit 0
