"Fossies" - the Fresh Open Source Software Archive

Member "bayonne-1.2.16/data/config/20Control.cfg" (4 Apr 2001, 1480 Bytes) of package /linux/misc/old/bayonne-1.2.16.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. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh 
    2 #desc: Server Control Operations
    3 # Copyright (C) 2001 Open Source Telecom Corporation.
    4 #
    5 # This file is free software; as a special exception the author gives
    6 # unlimited permission to copy and/or distribute it, with or without
    7 # modifications, as long as this notice is preserved.
    8 #
    9 # This program is distributed in the hope that it will be useful, but
   10 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
   11 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   12 
   13 if test -z "$DIALOG" ; then DIALOG=dialog ; fi
   14 if test -z "$SETUP" ; then SETUP=../../server/bayonne_setup ; fi
   15 if test -z "$CONFIG" ; then CONFIG="exit 0" ; fi
   16 if test -z "$UPDATE" ; then UPDATE="exec $0" ; fi 
   17 if test -z "$TITLE" ; then TITLE="Bayonne Admin" ; fi
   18 
   19 export DIALOG SETUP CONFIG TITLE
   20 
   21 runfiles=`$SETUP --runfiles`
   22 if test -w $runfiles/bayonne.ctrl ; then
   23     CONTROL=$runfiles/bayonne.ctrl
   24 else
   25     CONTROL=$HOME/.bayonne.ctrl
   26 fi
   27 
   28 $DIALOG --title "Select operation" \
   29     --backtitle "$TITLE" \
   30     --menu "\
   31 Control Interface: $CONTROL\n\
   32 Perform one of the specified operations" \
   33     0 0 0 \
   34     "Compile" "Re-compile all scripts" \
   35     "Down" "Shutdown running server" \
   36     "Reload" "Reload all map tables" \
   37     "Restart" "Restart/activate changes" \
   38     2>/tmp/menu.tmp.$$
   39 retval=$?
   40 TITLE="Bayonne Admin"
   41 case "$retval" in
   42 0)
   43     choice=`cat /tmp/menu.tmp.$$`
   44     rm -f /tmp/menu.tmp.$$
   45     TITLE="$choice executed"
   46     echo $choice >$CONTROL
   47     $UPDATE
   48     ;;
   49 *)
   50     $CONFIG
   51     ;;
   52 esac
   53 exit 0
   54