Skip to content

Instantly share code, notes, and snippets.

@aausch
Created March 31, 2014 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aausch/9887035 to your computer and use it in GitHub Desktop.
Save aausch/9887035 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
#from this post: http://www.linuxquestions.org/questions/programming-9/script-to-see-if-a-process-ir-running-if-not-start-it-339618/
open PROS, "ps -ef|grep process |";
while ($line = <PROS>){
unless ($line =~ m/grep/){
exit;
}
}
exec 'nohup /path/to/my/script/./script &';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment