Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Start clamav and havp in the correct sequence

    pfSense Packages
    2
    4
    2899
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      daniele_dll last edited by

      I've a problem that i don't understand how to resolve :\

      I've installed a pfsense 1.2.0 with squid and squidguard packages. Later i've installed clamav and havp packages from freebsd 6.3 packages. All works perfectly but i've a problem at startup! Pratically, havp tries to start before clamav so it can't found the socket and give an error!

      
      30/01/2009 10:40:46 === Starting HAVP Version: 0.86
      30/01/2009 10:40:46 === Mandatory locking disabled! KEEPBACK settings not used!
      30/01/2009 10:40:46 Change to user clamav
      30/01/2009 10:40:46 Change to group clamav
      30/01/2009 10:40:46 --- Initializing Clamd Socket Scanner
      30/01/2009 10:40:47 Clamd: Could not connect to scanner! Scanner down?
      30/01/2009 10:40:47 ERROR: Clamd Socket Scanner failed EICAR virus test! (Could not connect to scanner socket)
      
      

      I've modified clamav and havp startup scripts to create their directories into /var/run at startup

      
      havp_enable="YES"
      
      . /etc/rc.subr
      
      mkdir /var/run/havp > /dev/null 2>&1
      chown clamav:clamav /var/run/havp
      .
      .
      .
      
      

      and

      
      clamav_clamd_enable="YES"
      
      . /etc/rc.subr
      
      mkdir /var/run/clamav > /dev/null 2>&1
      chown clamav:clamav /var/run/clamav
      .
      .
      .
      
      

      I've tried to set into the HAVP package the REQUIRED fields to clamav, clamd, clamav-clamd and clamav_clamd but nothing to do, so i setted the BEFORE field into clamav-clamd startup script to havp, but here, too, nothing to do!

      Someone has a solution?

      thank you!

      1 Reply Last reply Reply Quote 0
      • D
        daniele_dll last edited by

        Temporanly i've resolved the problem with this little piece of bash code

        
        # check if havp must start
        if [ "$1" = "start" ];
        then
        
          # initialize a timer
          TIMER=20
        
          # loop timer got zero or until clamav socket is founded
          while [ $TIMER -gt 0 ] && [ ! -S /var/run/clamav/clamd ];
          do
        
            sleep 1
            let TIMER-=1 > /dev/null
        
          done
        
          # check if TIMER is equal to zero
          if [ ! -S /var/run/clamav/clamd  ];
          then
            echo "Clamav scanner socket missing!"
            exit 1
          fi
        fi
        
        

        before

        
        run_rc_command "$1"
        
        

        into /usr/local/etc/rc.d/havp.sh

        pratically … a simple timer that waits for 20 seconds before give a timeout, but it's not really realiable :\

        however ... better solutions are really appreciated

        1 Reply Last reply Reply Quote 0
        • D
          dvserg last edited by

          Look my HAVP gui:

          1 Reply Last reply Reply Quote 0
          • D
            daniele_dll last edited by

            @dvserg:

            Look my HAVP gui:

            I've tried to access it, but my proxy in the office blocks narod.ru

            (i use http://squidguard.mesd.k12.or.us/blacklists.tgz blacklists)

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Products

            • Platform Overview
            • TNSR
            • pfSense Plus
            • Appliances

            Services

            • Training
            • Professional Services

            Support

            • Subscription Plans
            • Contact Support
            • Product Lifecycle
            • Documentation

            News

            • Media Coverage
            • Press
            • Events

            Resources

            • Blog
            • FAQ
            • Find a Partner
            • Resource Library
            • Security Information

            Company

            • About Us
            • Careers
            • Partners
            • Contact Us
            • Legal
            Our Mission

            We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

            Subscribe to our Newsletter

            Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

            © 2021 Rubicon Communications, LLC | Privacy Policy