cancel
Showing results for 
Search instead for 
Did you mean: 

Run command every time MACs computer go to sleep mode/wake up or login.

captainit
Novitiate I

Hello,
Please your help.
I need to run for 30 MAC (only MACs) computers this command:
ps aux | grep -i 'forti' | grep -v 'grep' | awk '{print $2}' | xargs sudo kill -9
I would like the MAC computers to run this command every time they go to sleep mode/wake up or login.

How can I do it please?
Thanks

0 REPLIES 0