activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1096628 - /activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
Date Mon, 25 Apr 2011 23:08:30 GMT
Author: chirino
Date: Mon Apr 25 23:08:30 2011
New Revision: 1096628

URL: http://svn.apache.org/viewvc?rev=1096628&view=rev
Log:
System V OS check to display correct usage info.

Modified:
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala?rev=1096628&r1=1096627&r2=1096628&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
Mon Apr 25 23:08:30 2011
@@ -130,10 +130,24 @@ class Create extends Action {
       if( !IS_WINDOWS ) {
         val service = bin / "apollo-broker-service"
         println("")
-        println("Or you can setup the broker as system service and run it using:")
-        println("")
-        println("   sudo ln -s %s /etc/init.d/".format(service.getCanonicalPath))
-        println("   /etc/init.d/apollo-broker-service start")
+
+        // Does it look like we are on a System V init system?
+        if( new File("/etc/init.d/").isDirectory ) {
+
+
+          println("Or you can setup the broker as system service and run it in the background:")
+          println("")
+          println("   sudo ln -s %s /etc/init.d/".format(service.getCanonicalPath))
+          println("   /etc/init.d/apollo-broker-service start")
+
+        } else {
+
+          println("Or you can run the broker in the background using:")
+          println("")
+          println("   %s start".format(service.getCanonicalPath))
+
+        }
+
       }
       println("")
 



Mime
View raw message