Fadjar Tandabawana
2013-02-20 17:29:42 UTC
Fadjar Tandabawana [http://community.zenoss.org/people/fadjar340] created the discussion
"Re: init.d script for zenoss"
To view the discussion, visit: http://community.zenoss.org/message/71623#71623
--------------------------------------------------------------
This is my Ubuntu init.d script for zenoss:
#! /bin/sh
# (c) Copyleft 2010 Lunchbox the Cruel
# All wrongs reserved.
#
# /etc/init.d/zenoss
ZEN_USER=zenoss
 case "$1" in
   start)
       echo -n "Starting Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss start"
       ;;
   stop)
       echo -n "Shutting down Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss stop"
       ;;
   restart)
       echo -n "Restart Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss restart"
       ;;
   status)
       echo -n "Checking of Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss status"
       ;;
   xstatus)
       echo -n "Checking list of Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss xstatus"
       ;;
   list)
       echo -n "Listing of Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss list"
       ;;
   *)
       ## If no parameters are given, print which are avaiable.
       echo "Usage: $0 {start|stop|restart|status|xstatus|list}"
       exit 1
       ;;
esac
exit 0
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/71623#71623]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"Re: init.d script for zenoss"
To view the discussion, visit: http://community.zenoss.org/message/71623#71623
--------------------------------------------------------------
This is my Ubuntu init.d script for zenoss:
#! /bin/sh
# (c) Copyleft 2010 Lunchbox the Cruel
# All wrongs reserved.
#
# /etc/init.d/zenoss
ZEN_USER=zenoss
 case "$1" in
   start)
       echo -n "Starting Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss start"
       ;;
   stop)
       echo -n "Shutting down Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss stop"
       ;;
   restart)
       echo -n "Restart Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss restart"
       ;;
   status)
       echo -n "Checking of Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss status"
       ;;
   xstatus)
       echo -n "Checking list of Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss xstatus"
       ;;
   list)
       echo -n "Listing of Zenoss System: "
       su "$ZEN_USER" -l -s /bin/sh -c "/usr/local/zenoss/bin/zenoss list"
       ;;
   *)
       ## If no parameters are given, print which are avaiable.
       echo "Usage: $0 {start|stop|restart|status|xstatus|list}"
       exit 1
       ;;
esac
exit 0
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/71623#71623]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]