"Fossies" - the Fresh Open Source Software Archive

Member "sendpage-1.001001/sendpage.init" (3 Jan 2008, 1302 Bytes) of package /linux/privat/old/sendpage-1.001001.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 #
    3 # Startup script for Sendpage
    4 #
    5 # chkconfig: 345 85 15
    6 # description: Sendpage sends alphanumeric pages via a modem, received \
    7 #              via SNPP.
    8 # processname: sendpage
    9 # pidfile: /var/spool/sendpage/sendpage.pid
   10 # config: /etc/sendpage.cf
   11 #
   12 ### BEGIN INIT INFO
   13 # Provides:       sendpage
   14 # Required-Start: $network $syslog
   15 # Required-Stop:  $network $syslog
   16 # Default-Start:  3 5
   17 # Default-Stop:   0 1 2 4 6
   18 # Description:    Alphanumeric TAP paging daemon
   19 ### END INIT INFO
   20 
   21 # try our two common locations
   22 SENDPAGE=/usr/bin/sendpage
   23 if [ ! -x $SENDPAGE ]; then
   24     SENDPAGE=/usr/local/bin/sendpage
   25     if [ ! -x $SENDPAGE ]; then
   26         echo 'Cannot execute sendpage !'
   27     fi
   28 fi
   29 
   30 # See how we were called.
   31 case "$1" in
   32   start)
   33         echo -n "Starting sendpage: "
   34         if $SENDPAGE -bd ; then
   35         echo "done"
   36     else
   37         echo "failed"
   38     fi
   39         ;;
   40   stop)
   41         echo -n "Shutting down sendpage: "
   42         if $SENDPAGE -bs ; then
   43         echo "done"
   44     else
   45         echo "failed"
   46     fi
   47         ;;
   48   status)
   49     $SENDPAGE -bq
   50     ;;
   51   restart)
   52         $0 stop
   53         $0 start
   54         ;;
   55   reload)
   56         echo -n "Reloading sendpage: "
   57         if $SENDPAGE -br ; then
   58         echo "done"
   59     else
   60         echo "failed"
   61     fi
   62         ;;
   63   *)
   64         echo "Usage: $0 {start|stop|restart|reload|status}"
   65         exit 1
   66 esac
   67 
   68 exit 0
   69