Advertisement
Guest User

Untitled

a guest
Aug 17th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. #!/bin/bash
  2. #make-run.sh
  3. #make sure a process is always running.
  4.  
  5. process=apache2
  6. makerun="service apache2 start"
  7.  
  8. if ps ax | grep -v grep | grep $process > /dev/null
  9. then
  10.     exit
  11. else
  12.     $makerun &
  13. fi
  14.  
  15. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement