home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / pmi / stop-applications.sh < prev   
Encoding:
Linux/UNIX/POSIX Shell Script  |  2006-03-20  |  345 b   |  18 lines

  1. #!/bin/bash
  2.  
  3. # Walk a directory, assembling a list of services that need to be stopped
  4. # Returns a string
  5.  
  6. . /etc/defaults/pmi
  7.  
  8. if [ ! -d $STOPDIR ]; then
  9.         echo "No such directory $STOPTDIR, exiting" >&2
  10.         exit 1
  11. fi
  12.  
  13. for file in $(find $STOPDIR -type f -print "%p "); do
  14.         STOPLIST="$STOPLIST "$(<$file);
  15. done
  16.  
  17. echo $STOPLIST
  18.