|
|
Come on, you know you want to buy me a beer!
So I got a bit tired of using /usr/local/zend/zendctl.sh to control the start and stop actions of Zend Server.
I wrote this little script to do exactly this.
Place this into /usr/bin
#!/bin/sh
#
#
# zendctl.sh Control Script, written by Roger Thomas
# August 25th 2011
#
#
#
echo "Usage: ./zendctl.sh <action>
start Start all Zend Server daemons
start-apache Start Apache only
start-lighttpd Start lighttpd only
start-jb Start Java bridge only
stop Stop all Zend Server daemons
stop-apache Stop Apache only
stop-lighttpd Stop lighttpd only
stop-jb Stop Java bridge only
restart Restart all Zend Server daemons
restart-apache Restart Apache only
graceful-apache Call Apache with graceful
restart-lighttpd Restart lighttpd only
restart-jb Restart Java bridge only
setup-jb Setup Java bridge
version Print Zend Server version
status Get Zend Server status
What command would you like to run?"
read COMMAND_RUN
echo "
Running $COMMAND_RUN - Please wait.
"
sh /usr/local/zend/bin/zendctl.sh $COMMAND_RUN
That's it! After this is in the /usr/bin directory you can just run:
sudo zend
Then enter in your command (more than likely start / stop / restart.
Zach commented on Sep 9th 2011
Perfect, worked first time. Thank you!