Created
          October 23, 2013 20:20 
        
      - 
      
- 
        Save vigith/7125979 to your computer and use it in GitHub Desktop. 
  
    
      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
    
  
  
    
  | adm1@cookbook$ cat /etc/service/sensu-client/run | |
| #!/bin/bash | |
| EMBEDDED_RUBY=false | |
| CONFIG_FILE=/etc/sensu/config.json | |
| CONFIG_DIR=/etc/sensu/conf.d | |
| EXTENSION_DIR=/etc/sensu/extensions | |
| PLUGINS_DIR=/etc/sensu/plugins | |
| HANDLERS_DIR=/etc/sensu/handlers | |
| LOG_DIR=/var/log/sensu | |
| USER=sensu | |
| if [ -f /etc/default/sensu ]; then | |
| . /etc/default/sensu | |
| fi | |
| prog="sensu-client" | |
| options="--log_level debug -c $CONFIG_FILE -d $CONFIG_DIR -e $EXTENSION_DIR -l $LOG_DIR/$prog.log $OPTIONS" | |
| # $ORIGINAL_PATH is set by sensu-runsvdir | |
| if [ "x$EMBEDDED_RUBY" = "xtrue" ]; then | |
| export PATH=/opt/sensu/embedded/bin:$ORIGINAL_PATH:$PLUGINS_DIR:$HANDLERS_DIR | |
| export GEM_PATH=/opt/sensu/embedded/lib/ruby/gems/2.0.0:$GEM_PATH | |
| else | |
| export PATH=$ORIGINAL_PATH:$PLUGINS_DIR:$HANDLERS_DIR | |
| fi | |
| exec 2>&1 | |
| exec /opt/sensu/embedded/bin/chpst -u $USER /opt/sensu/bin/$prog $options | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment