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

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/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.

Comments


Your Name:

Email Address: (won't be published)

Comments: (no HTML allowed)

 

Zach commented on Sep 9th 2011

Perfect, worked first time. Thank you!

 

 

 

 

 

 

Latest Posts