"Fossies" - the Fresh Open Source Software Archive

Member "scanlogd-2.2.8/scanlogd.init" (10 Mar 2021, 787 Bytes) of package /linux/misc/scanlogd-2.2.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # $Owl: Owl/packages/scanlogd/scanlogd/scanlogd.init,v 1.3 2005/11/16 13:31:51 solar Exp $
    3 #
    4 # chkconfig: - 35 85
    5 # description: \
    6 #   scanlogd detects and logs TCP port scans.
    7 # processname: scanlogd
    8 
    9 # Source function library.
   10 . /etc/rc.d/init.d/functions
   11 
   12 OWL_STARTUP_ENABLE=1
   13 
   14 case "$1" in
   15 start)
   16     if [ "0$OWL_STARTUP_VERSION" -ge 3 ]; then
   17         daemon --expect-user scanlogd scanlogd
   18     else
   19         daemon scanlogd
   20     fi
   21     ;;
   22 stop)
   23     if [ "0$OWL_STARTUP_VERSION" -ge 3 ]; then
   24         killproc --expect-user scanlogd scanlogd
   25     else
   26         killproc scanlogd
   27     fi
   28     ;;
   29 restart)
   30     $0 stop
   31     $0 start
   32     ;;
   33 status)
   34     if [ "0$OWL_STARTUP_VERSION" -ge 3 ]; then
   35         status --expect-user scanlogd scanlogd
   36     else
   37         status scanlogd
   38     fi
   39     ;;
   40 *)
   41     echo "Usage: scanlogd {start|stop|restart|status}"
   42     exit 1
   43 esac
   44 
   45 exit $?