Eric J. Wisti said:
>
> /var/run on Solaris is a virtual file system (similar to default /tmp). It
> doesn't stay around after a shutdown/reboot. I have added 'test -d
> /var/run/clamd || mkdir /var/run/clamd && chown clamav:clamav
> /var/run/clamd' to my startup script.
>
> How are others with Solaris handling the socket?

I run things with tcp sockets and another milter now because I have a
distributed system, but this is a recent code snippet from when I ran
clmilter locally. The socket permissions needed no additional attention
but you may want to have a look at yours:

case $1 in
'start')
        # clean up some files first
        if [ ! -d /var/run/clamav ]
        then
           /usr/bin/mkdir /var/run/clamav
           /usr/bin/chown clamav:clamav /var/run/clamav
        fi

        if [ -f /var/run/clamav/clamd.pid ]
        then
           /usr/bin/rm -f /var/run/clamav/clamd.pid
        fi

        if [ -f /var/run/clamav/clmilter.sock ]
        then
           /usr/bin/rm -f /var/run/clamav/clmilter.sock
        fi

        # start the daemon
        /usr/bin/pkill clamd # avoid multiple copies
        /usr/bin/sleep 1
        /usr/local/sbin/clamd
        ;;

'stop')
        /usr/bin/pkill clamd
        /usr/bin/pkill freshclam
        /usr/bin/rm -f /var/run/clamav/clmilter.sock
        /usr/bin/rm -f /var/run/clamav/clamd.pid
        ;;

*)
        echo "usage: clamav {start|stop}"
        ;;
esac

dp
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to