Skip to content

Instantly share code, notes, and snippets.

@pearofducks
Created January 18, 2014 17:01
Show Gist options
  • Save pearofducks/8493174 to your computer and use it in GitHub Desktop.
Save pearofducks/8493174 to your computer and use it in GitHub Desktop.
Eye files for Debian
#!/bin/bash
#
# eye Startup script for Eye monitoring tool.
#
# chkconfig: - 85 15
# description: eye monitors your system
#
CONF_DIR=/etc/eye/eye.conf
PID=/var/run/eye.pid
LOG=/var/log/eye.log
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RETVAL=0
source /usr/local/share/chruby/chruby.sh
chruby ruby
case "$1" in
start)
eye load $CONF_DIR
RETVAL=$?
;;
stop)
eye stop all
RETVAL=$?
;;
restart)
eye restart all
RETVAL=$?
;;
status)
eye info
RETVAL=$?
;;
*)
echo "Usage: eye {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
Eye.load("./*.eye")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment