:D Portsentry error !!

Discussion in 'HOWTO-Related Questions' started by Mounir, Aug 23, 2006.

  1. Mounir

    Mounir New Member

    Hi

    I used the Chkrootkit-Portsentry-Howto. evrythings goes well.

    I got this error when i try to start de init.

    /etc/init.d/portsentry start


    Starting Portsentry...
    /etc/init.d/portsentry: line 9: /usr/local/psionic/portsentry/portsentry: No such file or directory
    /etc/init.d/portsentry: line 14: /usr/local/psionic/portsentry/portsentry: No such file or directory
    Portsentry is now up and running!

    In the /usr/local/psionic/portsentry/ i have:

    portsentry.conf portsentry.conf~ portsentry.ignore

    Can u help please?
    Thanx

    Mounir :D:cool:
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/init.d/portsentry?
     
  3. Mounir

    Mounir New Member

    script out the howto:

    Thanx
    :D
     
  4. falko

    falko Super Moderator ISPConfig Developer

    The script should be

    Code:
    #!/bin/bash
    
    
    case "$1" in
        start)
            echo "Starting Portsentry..."
            ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry -atcp' | grep -iv 'grep' > /dev/null
            if [ $? != 0 ]; then
              /usr/local/psionic/portsentry/portsentry -atcp
            fi
    
            ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry -audp' | grep -iv 'grep' > /dev/null
            if [ $? != 0 ]; then
              /usr/local/psionic/portsentry/portsentry -audp
            fi
            echo "Portsentry is now up and running!"
        ;;
        stop)
            echo "Shutting down Portsentry..."
            array=(`ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry' | grep -iv 'grep' \
                           | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
            element_count=${#array[@]}
            index=0
            while [ "$index" -lt "$element_count" ]
            do
              kill -9 ${array[$index]}
              let "index = $index + 1"
            done
            echo "Portsentry stopped!"
        ;;
        restart)
            $0 stop  && sleep 3
            $0 start
        ;;
        *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
    esac
    exit 0
    What's the output of
    Code:
    updatedb
    locate portsentry
    ?
     

Share This Page