I am using hazel a lot for handbrakecli. Thats great, its working.
I have a rule that runs whenever a file hits the folder with a certain extension. However, I dont want this rule to run if there is already another process running. How can I have it check that a process is running.
I understand I can have it so it passes a shell script, and I see that if it exits with status 0, it indicates a match.
So I run the command:
ps aux | grep HandBrakeCLI | wc -l
which responds with 1, since it finds its own grep command. So I want it to not return that, it should be 0
Further...is that the exit status or just a count. If its the count of 0, that deoesnt satisfy the 'passing' of the shell script.
Any help appreciated.