Created
          April 22, 2015 21:34 
        
      - 
      
 - 
        
Save metasov/8f512599729dfdb25686 to your computer and use it in GitHub Desktop.  
    inotifywait
  
        
  
    
      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
    
  
  
    
  | archim@monitoring:/etc/smokeping$ cat watch.sh | |
| #!/bin/bash | |
| cd /etc/smokeping/config.d | |
| while :; do | |
| inotifywait -e CLOSE_WRITE /etc/smokeping/config.d/* | |
| for f in *config.txt; do | |
| python /etc/smokeping/convert.py $f > `basename $f .txt`_converted.txt | |
| done | |
| invoke-rc.d smokeping restart | |
| done | |
| archim@monitoring:/etc/smokeping$ grep watch.sh /etc/rc.local | |
| screen -S inotify-smokeping-reload -d -m -- /etc/smokeping/watch.sh | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment