Enclose all echoed messages in double quotes
Replace -o logical operator with double pipe
This will ensure the right-hand test is discarded if the left
is evaluated as true. For more details see :-

http://rgeissert.blogspot.co.uk/2013/02/a-bashism-week-short-circuiting-tests.html
Remove the superfluous spaces before colons
in if [ "$foo" ] ; then statements.
Remove unnecessary else
Use arrays and nested for-loops to search for program files
Previously there was a brute force approach and a lot of
duplication.

With this change the script will break out of the
inner loop once both files have been located instead of carrying
on checking remaining locations. The value of the $PROGPATH array
is queried to check for missing files instead of using test -f to
see whether a file exists or not.

To make the search as fast as possible, both program files should
be put in the same $BINDIR (eg /usr/sbin) and have that directory
moved to the front of the list in the for loop.
Remove unnecessary getpids check when stopping the service
Use an array and for-loop for stops and restarts
Switch around the if and elif cases so that stopping is done first
Add status argument to the startup script
If the script is invoked as status, it will show whether Deadwood
is running or not.
Move variables to top of start script
This makes things much neater and saves space.
Switch around the if-then cases in the start/restart section
Fix the test for the script argument in the stop/restart section
Add for-loop and array to script and shorten file search comment
Move getpids and usage information above the stop/start section
Transplant program file search section into start/restart section
The file search is only ever used to actually start/restart the
service.

Use j instead of i for the search's for-loop to avoid clashing
with the outer loop.

Add BINDIR array to unclutter the search code.
Combine stop/restart and start/restart sections under same for-loop
Use PIDS to avoid a call to the getpids function
This variable is used to avert the calculation involved in calling
to the getpids function.

PIDS is obviously not used when deciding if a process is dead or
not when trying to kill it in the stop section.
Reformat the status section
Delete blank line introduced a couple of commits ago
Add note to the stop, start, restart section
The ${STOP_RESTART[$i]} and ${START_RESTART[$i]} array names
correspond to i's numerical order ie i=0 is STOP or START and i=1
corresponds to RESTART.