uchiwa.sh.j2 525 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
  3. export PATH
  4. set -o errexit
  5. set -o xtrace
  6. . /lib/svc/share/smf_include.sh
  7. HOME={{ sensu_uchiwa_path }}
  8. UCHIWA_PATH=${HOME}/go/src/github.com/sensu/uchiwa
  9. UCHIWA_USER={{ sensu_user_name }}
  10. if [ ! -d $HOME ]; then
  11. echo "No directory found at: $HOME"
  12. fi
  13. if [ ! -f $HOME/etc/config.json ]; then
  14. echo "No Uchiwa config found at: ${HOME}/config.json"
  15. fi
  16. cd $UCHIWA_PATH
  17. ${HOME}/go/bin/uchiwa -c ${HOME}/etc/config.json &
  18. exit ${SMF_EXIT_OK}