home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / d-linux.zip / dm-dist / opstart < prev    next >
Text File  |  1991-03-01  |  462b  |  27 lines

  1. #!/bin/csh
  2.  
  3. # Rekursivt at-job. Starter 'nightrun' og bestiller sig selv til n{ste dag
  4.  
  5.  
  6. # remove opstartfailed
  7. if (-e opstartfailed) then
  8.    rm opstartfailed
  9. endif
  10.  
  11.  
  12. # put new job in queue
  13. if `atq | awk '/opstart/ {print $1}' | head -1` == "" then
  14.    at -c 1705 opstart
  15. endif
  16.  
  17.  
  18. # get process id
  19. set process = `ps -gax | awk '/dmserver/ && ! /awk/ {print $1}' | head -1`
  20.  
  21. if $process == "" then
  22.    nightrun &
  23. else
  24.    echo "process exists" > opstartfailed
  25. endif
  26.  
  27.