Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 390 lines (326 sloc) 9.761 kb
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
1 #! /bin/sh
b0d05309 » JasonGiedymin
2009-04-04 Added LSB header style to script.
2 ### BEGIN INIT INFO
3 # Provides: nginx
4 # Required-Start: $remote_fs $syslog
5 # Required-Stop: $remote_fs $syslog
6 # Default-Start: 2 3 4 5
7 # Default-Stop: 0 1 6
e9432372 » JasonGiedymin
2011-07-12 Changes on text in header. Not a version bump.
8 # Short-Description: nginx init.d dash script for Ubuntu or other *nix.
9 # Description: nginx init.d dash script for Ubuntu or other *nix.
b0d05309 » JasonGiedymin
2009-04-04 Added LSB header style to script.
10 ### END INIT INFO
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
11 #------------------------------------------------------------------------------
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
12 # nginx - this Debian Almquist shell (dash) script, starts and stops the nginx
e9432372 » JasonGiedymin
2011-07-12 Changes on text in header. Not a version bump.
13 # daemon for Ubuntu and other *nix releases.
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
14 #
15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse \
16 # proxy and IMAP/POP3 proxy server. This \
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
17 # script will manage the initiation of the \
18 # server and it's process state.
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
19 #
20 # processname: nginx
21 # config: /usr/local/nginx/conf/nginx.conf
e9432372 » JasonGiedymin
2011-07-12 Changes on text in header. Not a version bump.
22 # pidfile: /var/run/nginx.pid
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
23 # Provides: nginx
24 #
25 # Author: Jason Giedymin
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
26 # <jason.giedymin AT gmail.com>.
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
27 #
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
28 # Version: 2.0 02-NOV-2009 jason.giedymin AT gmail.com
e9432372 » JasonGiedymin
2011-07-12 Changes on text in header. Not a version bump.
29 # Notes: nginx init.d dash script for Ubuntu.
8140c374 » JasonGiedymin
2009-11-02 * Added project home to source.
30 #
31 # This script's project home is:
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
32 # http://github.com/JasonGiedymin/nginx-init-ubuntu
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
33 #
34 #------------------------------------------------------------------------------
35 # MIT X11 License
36 #------------------------------------------------------------------------------
37 #
e9432372 » JasonGiedymin
2011-07-12 Changes on text in header. Not a version bump.
38 # Copyright (c) 2009 Jason Giedymin, http://jasongiedymin.com
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
39 #
40 # Permission is hereby granted, free of charge, to any person obtaining
41 # a copy of this software and associated documentation files (the
42 # "Software"), to deal in the Software without restriction, including
43 # without limitation the rights to use, copy, modify, merge, publish,
44 # distribute, sublicense, and/or sell copies of the Software, and to
45 # permit persons to whom the Software is furnished to do so, subject to
46 # the following conditions:
47 #
48 # The above copyright notice and this permission notice shall be
49 # included in all copies or substantial portions of the Software.
50 #
51 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
55 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
56 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
57 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
58d5ac8c » JasonGiedymin
2009-04-02 Swapped for turn-key version.
58 #------------------------------------------------------------------------------
59
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
60 #------------------------------------------------------------------------------
61 # Functions
62 #------------------------------------------------------------------------------
63 . /lib/lsb/init-functions
64
65 #------------------------------------------------------------------------------
66 # Consts
67 #------------------------------------------------------------------------------
68 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
79bd8d33 » cadorn
2011-08-04 Fixed PID management since nginx does not write its own PID file
69
70 if [ -f /usr/local/nginx/sbin/nginx ];
71 then
72 DAEMON=/usr/local/nginx/sbin/nginx
73 else
74 DAEMON=/usr/local/sbin/nginx
75 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
76
51c85e22 » JasonGiedymin
2009-04-07 Various defects fixed.
77 PS="nginx"
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
78 PIDNAME="nginx" #lets you do $PS-slave
79 PIDFILE=$PIDNAME.pid #pid file
1c254c2e » JasonGiedymin
2009-11-04 * Cleaned up pid & conf locations, re-enabling turn-key operation.
80 PIDSPATH=/var/run
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
81
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
82 DESCRIPTION="Nginx Server..."
83
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
84 RUNAS=root #user to run as
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
85
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
86 SCRIPT_OK=0 #ala error codes
87 SCRIPT_ERROR=1 #ala error codes
88 TRUE=1 #boolean
89 FALSE=0 #boolean
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
90
91 lockfile=/var/lock/subsys/nginx
1c254c2e » JasonGiedymin
2009-11-04 * Cleaned up pid & conf locations, re-enabling turn-key operation.
92 NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
93
94 #------------------------------------------------------------------------------
95 # Simple Tests
96 #------------------------------------------------------------------------------
97
98 #test if nginx is a file and executable
99 test -x $DAEMON || exit 0
100
101 # Include nginx defaults if available
102 if [ -f /etc/default/nginx ] ; then
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
103 . /etc/default/nginx
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
104 fi
105
106 #set exit condition
107 #set -e
108
109 #------------------------------------------------------------------------------
110 # Functions
111 #------------------------------------------------------------------------------
112
51c85e22 » JasonGiedymin
2009-04-07 Various defects fixed.
113 setFilePerms(){
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
114 if [ -f $PIDSPATH/$PIDFILE ]; then
115 chmod 400 $PIDSPATH/$PIDFILE
116 fi
51c85e22 » JasonGiedymin
2009-04-07 Various defects fixed.
117 }
118
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
119 configtest() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
120 $DAEMON -t -c $NGINX_CONF_FILE
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
121 }
122
123 getPSCount() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
124 return `pgrep -f $PS | wc -l`
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
125 }
126
3c53b78b » JasonGiedymin
2009-11-04 * Fixed quietupgrade functionality.
127 isRunning() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
128 if [ $1 ]; then
129 pidof_daemon $1
130 PID=$?
131
132 if [ $PID -gt 0 ]; then
133 return 1
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
134 else
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
135 return 0
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
136 fi
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
137 else
138 pidof_daemon
139 PID=$?
140
141 if [ $PID -gt 0 ]; then
142 return 1
143 else
144 return 0
145 fi
146 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
147 }
148
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
149 #courtesy of php-fpm
150 wait_for_pid () {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
151 try=0
152
153 while test $try -lt 35 ; do
154 case "$1" in
155 'created')
156 if [ -f "$2" ] ; then
157 try=''
158 break
159 fi
160 ;;
161
162 'removed')
163 if [ ! -f "$2" ] ; then
164 try=''
165 break
166 fi
167 ;;
168 esac
169
170 try=`expr $try + 1`
171 sleep 1
172 done
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
173 }
174
79bd8d33 » cadorn
2011-08-04 Fixed PID management since nginx does not write its own PID file
175 wait_for_not_running(){
176 try=0
177 while test $try -lt 35 ; do
178
179 isRunning
180 isAlive=$?
181
182 if [ "${isAlive}" -eq $TRUE ]; then
183 try=`expr $try + 1`
184 sleep 1
185 else
186 try=''
187 break
188 fi
189 done
190 }
191
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
192 status(){
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
193 isRunning
194 isAlive=$?
195
196 if [ "${isAlive}" -eq $TRUE ]; then
197 echo "$PIDNAME found running with processes: `pidof $PS`"
198 else
199 echo "$PIDNAME is NOT running."
200 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
201 }
202
79bd8d33 » cadorn
2011-08-04 Fixed PID management since nginx does not write its own PID file
203 writePIDFile(){
204 ps axuww | grep $DAEMON | grep $NGINX_CONF_FILE | perl -lpe '($_) = /^[\D]*(\d*)/' > $PIDSPATH/$PIDFILE
205 setFilePerms
206 }
207
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
208 removePIDFile(){
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
209 if [ $1 ]; then
210 if [ -f $1 ]; then
211 rm -f $1
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
212 fi
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
213 else
214 #Do default removal
215 if [ -f $PIDSPATH/$PIDFILE ]; then
216 rm -f $PIDSPATH/$PIDFILE
217 fi
218 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
219 }
220
221 start() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
222 log_daemon_msg "Starting $DESCRIPTION"
223
224 isRunning
225 isAlive=$?
226
227 if [ "${isAlive}" -eq $TRUE ]; then
228 log_end_msg $SCRIPT_ERROR
229 else
230 start-stop-daemon --start --quiet --chuid \
231 $RUNAS --pidfile $PIDSPATH/$PIDFILE --exec $DAEMON \
232 -- -c $NGINX_CONF_FILE
79bd8d33 » cadorn
2011-08-04 Fixed PID management since nginx does not write its own PID file
233 writePIDFile
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
234 log_end_msg $SCRIPT_OK
235 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
236 }
237
238 stop() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
239 log_daemon_msg "Stopping $DESCRIPTION"
240
241 isRunning
242 isAlive=$?
243
244 if [ "${isAlive}" -eq $TRUE ]; then
245 start-stop-daemon --stop --quiet --pidfile $PIDSPATH/$PIDFILE
246
79bd8d33 » cadorn
2011-08-04 Fixed PID management since nginx does not write its own PID file
247 wait_for_not_running
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
248
249 if [ -n "$try" ] ; then
250 log_end_msg $SCRIPT_ERROR
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
251 else
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
252 removePIDFile
253 log_end_msg $SCRIPT_OK
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
254 fi
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
255 else
256 log_end_msg $SCRIPT_ERROR
257 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
258 }
259
260 reload() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
261 configtest || return $?
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
262
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
263 log_daemon_msg "Reloading (via HUP) $DESCRIPTION"
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
264
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
265 isRunning
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
266
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
267 if [ $? -eq $TRUE ]; then
268 `killall -HUP $PS` #to be safe
269 log_end_msg $SCRIPT_OK
270 else
271 log_end_msg $SCRIPT_ERROR
272 fi
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
273 }
274
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
275 quietupgrade() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
276 log_daemon_msg "Peforming Quiet Upgrade $DESCRIPTION"
277
278 isRunning
279 isAlive=$?
280
281 if [ "${isAlive}" -eq $TRUE ]; then
282 kill -USR2 `cat $PIDSPATH/$PIDFILE`
283 kill -WINCH `cat $PIDSPATH/$PIDFILE.oldbin`
284
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
285 isRunning
286 isAlive=$?
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
287
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
288 if [ "${isAlive}" -eq $TRUE ]; then
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
289 kill -QUIT `cat $PIDSPATH/$PIDFILE.oldbin`
290 wait_for_pid 'removed' $PIDSPATH/$PIDFILE.oldbin
3c53b78b » JasonGiedymin
2009-11-04 * Fixed quietupgrade functionality.
291 removePIDFile $PIDSPATH/$PIDFILE.oldbin
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
292
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
293 log_end_msg $SCRIPT_OK
294 else
295 log_end_msg $SCRIPT_ERROR
296
297 log_daemon_msg "ERROR! Reverting back to original $DESCRIPTION"
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
298
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
299 kill -HUP `cat $PIDSPATH/$PIDFILE`
300 kill -TERM `cat $PIDSPATH/$PIDFILE.oldbin`
301 kill -QUIT `cat $PIDSPATH/$PIDFILE.oldbin`
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
302
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
303 wait_for_pid 'removed' $PIDSPATH/$PIDFILE.oldbin
304 removePIDFile $PIDSPATH/$PIDFILE.oldbin
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
305
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
306 log_end_msg $SCRIPT_ok
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
307 fi
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
308 else
309 log_end_msg $SCRIPT_ERROR
310 fi
3dbbedbf » JasonGiedymin
2009-11-02 * Added function to wait for pid.
311 }
312
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
313 terminate() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
314 log_daemon_msg "Force terminating (via KILL) $DESCRIPTION"
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
315
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
316 PIDS=`pidof $PS` || true
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
317
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
318 [ -e $PIDSPATH/$PIDFILE ] && PIDS2=`cat $PIDSPATH/$PIDFILE`
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
319
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
320 for i in $PIDS; do
321 if [ "$i" = "$PIDS2" ]; then
322 kill $i
323 wait_for_pid 'removed' $PIDSPATH/$PIDFILE
324 removePIDFile
325 fi
326 done
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
327
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
328 log_end_msg $SCRIPT_OK
3c53b78b » JasonGiedymin
2009-11-04 * Fixed quietupgrade functionality.
329 }
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
330
3c53b78b » JasonGiedymin
2009-11-04 * Fixed quietupgrade functionality.
331 destroy() {
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
332 log_daemon_msg "Force terminating and may include self (via KILLALL) $DESCRIPTION"
79bd8d33 » cadorn
2011-08-04 Fixed PID management since nginx does not write its own PID file
333 removePIDFile
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
334 killall $PS -q >> /dev/null 2>&1
335 log_end_msg $SCRIPT_OK
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
336 }
337
338 pidof_daemon() {
339 PIDS=`pidof $PS` || true
340
341 [ -e $PIDSPATH/$PIDFILE ] && PIDS2=`cat $PIDSPATH/$PIDFILE`
342
343 for i in $PIDS; do
344 if [ "$i" = "$PIDS2" ]; then
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
345 return 1
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
346 fi
347 done
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
348
0b99837d » JasonGiedymin
2009-04-05 Fixed defects 2, 3, 4, and 5.
349 return 0
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
350 }
351
352 case "$1" in
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
353 start)
354 start
355 ;;
356 stop)
357 stop
358 ;;
359 restart|force-reload)
360 stop
361 sleep 1
362 start
363 ;;
364 reload)
365 $1
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
366 ;;
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
367 status)
368 status
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
369 ;;
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
370 configtest)
371 $1
372 ;;
373 quietupgrade)
374 $1
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
375 ;;
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
376 terminate)
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
377 $1
378 ;;
5eacedf1 » JasonGiedymin
2011-07-12 Indentation fixed. Not a version bump.
379 destroy)
380 $1
381 ;;
382 *)
383 FULLPATH=/etc/init.d/$PS
384 echo "Usage: $FULLPATH {start|stop|restart|force-reload|status|configtest|quietupgrade|terminate|destroy}"
385 echo " The 'destroy' command should only be used as a last resort."
386 exit 1
387 ;;
9ff13d98 » JasonGiedymin
2009-04-02 Added version 1.0 of script. Tested on 8.10.
388 esac
389
390 exit 0
Something went wrong with that request. Please try again.