Created
          May 4, 2015 12:29 
        
      - 
      
- 
        Save indefinit/0f207a0bbea5a6596a57 to your computer and use it in GitHub Desktop. 
    A small suite of simple bash scripts for use in long term installations (monitoring/maintenance, etc.)
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| echo "shutting down [your app name] for the day" >> /Users/SI/Dropbox/InstallationLogs/[your app name here]/ProcessLog.txt | |
| osascript -e 'tell application "[your app name]" to quit' | |
| echo "successful shutdown at $(date)" >> /Users/SI/Dropbox/InstallationLogs/[your app name here]/ProcessLog.txt | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| # begin code block | |
| { | |
| if [ -z $(ps aux | grep '[replace with your app name here]') ] | |
| then | |
| echo "App not running." | |
| else | |
| echo $(ps aux | grep 'replace with your app name') | |
| fi | |
| } >> /Users/SI/Dropbox/InstallationLogs/[your app name here]/ProcessLog.txt | |
| system_profiler SPDisplaysDataType | grep Resolution >> /Users/SI/Dropbox/InstallationLogs/[your app name]/DisplayResolutionLog.txt | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment