3 # 3dm2: Starts the 3ware daemon
5 # Author: Rafal Cygnarowski <pascalek@pld-linux.org>
8 # description: Start the 3dm2 application which logs the current state
9 # of the 3ware DiskSwitch controller card, and then polls
13 # config: /etc/3dm2/3dm2.conf
15 # Source function library.
16 . /etc/rc.d/init.d/functions
20 # See how we were called.
23 if [ ! -f /var/lock/subsys/3dm2 ]; then
24 msg_starting "3DM2 Utility"
25 start-stop-daemon --start --quiet --exec /usr/sbin/3dm2
27 if [ $RETVAL -eq 0 ]; then
29 touch /var/lock/subsys/3dm2
35 msg_already_running "3DM2 Utility"
39 if [ -f /var/lock/subsys/3dm2 ]; then
40 msg_stopping "3DM2 Utility"
41 start-stop-daemon --stop --quiet --exec /usr/sbin/3dm2 1> /dev/null
43 if [ $RETVAL -eq 0 ]; then
45 rm -f /var/lock/subsys/3dm2
51 msg_not_running "3DM2 Utility"
65 echo "Usage: $0 {start|stop|status|restart}"