Recommended Posts

Hi,

 

I am looking to write simple script so when I run it, if both are running it stops them, if they are not it starts them, this is the script I have so far:

#!/bin/bash
 
 
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plist
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

How can I make it so if they are loaded it unloads them if its not it loads them? like a condition?

Link to comment
https://www.neowin.net/forum/topic/1198111-bash-script-help/
Share on other sites

This topic is now closed to further replies.