"Fossies" - the Fresh Open Source Software Archive

Member "passwd_exp-1.2.11/passwd_exp.cron" (17 Mar 2005, 770 Bytes) of package /linux/privat/old/passwd_exp-1.2.11.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 # passwd_exp daily check script
    3 #####
    4 # Run (DAILY) password expiration check script ( passwd_exp )
    5 #   by Sam <samkob@gmail.com>
    6 ####
    7 
    8 #setup command path replaced by install script
    9 exec_prefix="@prefix@"
   10 passwd_exp="@sbindir@/passwd_exp"
   11 
   12 #first run the passwd_exp program
   13 RETERR=`$passwd_exp 2>&1`
   14 RETVAL=$?
   15 
   16 #check returned ( nothing is good ), on error report error to stderr
   17 if ! test "$RETVAL" = 0;
   18   then 
   19   DATE=`date`
   20   cat <<__EOF__ >&2
   21   Error running password expiration checks
   22 
   23   There occured some error(s) while running password
   24     expiration program checks by cron.
   25 
   26   Program command line:
   27 $passwd_exp
   28   
   29   Program exited with error code "$RETVAL", returning this error message:
   30 $RETERR
   31   
   32 ---
   33   Error generated by $0 on $DATE.
   34 __EOF__
   35 
   36 fi