- slightly modified default openssl.cnf; used for generating CSRs in plc.d/ssl
[myplc.git] / host.init
index 77cd087..0f46162 100755 (executable)
--- a/host.init
+++ b/host.init
@@ -6,7 +6,7 @@
 #
 # description: Manages all PLC services on this machine
 #
-# $Id: host.init,v 1.4 2006/04/12 19:30:47 mlhuang Exp $
+# $Id: host.init,v 1.6 2006/04/20 09:01:00 thierry Exp $
 #
 
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
@@ -60,6 +60,15 @@ mount_plc ()
     [ $ERRORS -eq 0 ] && success $"PLC unmount" || failure $"PLC unmount"      
     echo
 
+}
+
+start ()
+{
+    # Starting everything
+    if [ -z "$1" ] ; then
+       mount_plc 
+    fi
+
     chroot $PLC_ROOT /sbin/service plc $PLC_OPTIONS start $*
     check
 }
@@ -86,8 +95,10 @@ stop ()
        check
     fi
 
-    umount_plc
-
+    # Stopped everything
+    if [ -z "$1" ] ; then
+       umount_plc
+    fi
 }
 
 mount_status ()
@@ -127,7 +138,7 @@ case "$command" in
        ;;
   
     *)
-       echo "Usage: $0 {start|stop|restart}"
+       echo "Usage: $0 {start|stop|restart|mount|umount|mountstatus}"
        RETVAL=1
        ;;
 esac