#!MARKER_SHELL_CMD ############################################################################### # # # DON'T HANG UP YET! # # ############################################################################### ############################################################################### # # Things you should know about this script: # # It is stored under RCS! Keep it that way! If you want a history of # changes made to this script then refer to rlog(1) - don't look here! # ############################################################################### ############################################################################### # # USER CONFIGURABLE STUFF STARTS HERE # ############################################################################### ############################################################################### # # USER CONFIGURABLE STUFF ENDS HERE # ############################################################################### ############################################################################### # # PACKAGE INDEPENDENT VARIABLE SETTINGS # ############################################################################### PATH=/bin:/usr/bin PROGNAME=`basename $0` VERSION="MARKER_PATCHLEVEL" #UMASK=022 #LOCK_DIR=MARKER_LOCK_DIR #ERRORS_CAUSE_EXITS=true # $Header: /home/ahuxley/dev/arc/ppplc/bin/RCS/dhuy.shpp,v 1.7 1999/04/28 09:44:31 alexis Exp $ #shpp include sm_msgids.shpp #shpp include ppplc_msgids.shpp ############################################################################### # # PACKAGE SPECIFIC VARIABLE SETTINGS # ############################################################################### SNDMSG=MARKER_LCLBINDIR/sndmsg ############################################################################### # # MAIN FUNCTION (called from very bottom of script) # ############################################################################### main() { ########################################################################### # # PROCESS OPTIONS # ########################################################################### # default values for things changable by command line options MODE=dhuy while [ "X$1" != X ]; do case "$1" in -V) echo "$PROGNAME version $VERSION" exit 0 ;; -d) [ "X$2" = X ] && usage VERBOSE_LEVEL=$2 shift ;; -v) VERBOSE_LEVEL=3 ;; -c) MODE=cancel ;; -*) usage ;; *) break ;; esac shift done # Are locks required? Nah. # Are you going to register temporary files? No. #trap sighandler 1 2 15 ########################################################################## # # SCRIPT GUTS STARTS HERE # ########################################################################## # clear pending announcements $SNDMSG MARKER_MSGID_DEL_MSGID MARKER_MSGID_EXEC_ANNOUNCE # clear pending hangups $SNDMSG MARKER_MSGID_DEL_MSGID MARKER_MSGID_HANGUP # announce 'pending hangups cancelled' now $SNDMSG MARKER_MSGID_EXEC_ANNOUNCE 9 if [ $MODE = dhuy ]; then # announce 'going down in 5 minutes' in 15 minutes $SNDMSG -q 900 MARKER_MSGID_EXEC_ANNOUNCE 7 # queue a hangup for 20 minutes $SNDMSG -q 1200 MARKER_MSGID_HANGUP # announce 'going down in 20 minutes' now $SNDMSG MARKER_MSGID_EXEC_ANNOUNCE 8 fi } usage() { { echo "Usage: $PROGNAME [ -d | -v ] [ -c ]" echo " $PROGNAME -V" } >&2 exit 2 } #shpp include utils.sh.shpp #shpp include gep.sh.shpp