Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by dughutch (registered user) on Tue, 2008-07-08 17:55.

Here is a start and stop script for hyperic on ubuntu. Please replace "user-other-than-root" as hyperic should not be started as root.

command to add into start up is...

 sudo update-rc.d hyperic defaults

 

#!/bin/sh

hyperic_start() {
  echo "Starting hyperic..."
  su "user-other-than-root" /home/hyperic/server-3.2.3/bin/hq-server.sh start
}

hyperic_stop() {
  echo "Stopping hyperic..."
  su "user-other-than-root" /home/hyperic/server-3.2.3/bin/hq-server.sh stop
}

hyperic_restart() {
  hyperic_stop
  sleep 1
  hyperic_start
}

case "$1" in
'start')
  hyperic_start
  ;;
'stop')
  hyperic_stop
  ;;
'restart')
  hyperic_restart
  ;;
*)
  hyperic_start
esac

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.