You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/06/26 09:39:41 UTC

karaf git commit: [KARAF-4551] wrapper:install on solaris lacks instructions to symlink scripts

Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x 7f772d2ec -> 2ec2c283c


[KARAF-4551] wrapper:install on solaris lacks instructions to symlink scripts


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/2ec2c283
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/2ec2c283
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/2ec2c283

Branch: refs/heads/karaf-4.0.x
Commit: 2ec2c283c8b8b722aa695c4e75655e78b3c533a0
Parents: 7f772d2
Author: lburgazzoli <lb...@gmail.com>
Authored: Fri Jun 3 10:29:08 2016 +0200
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Sun Jun 26 11:39:00 2016 +0200

----------------------------------------------------------------------
 .../apache/karaf/wrapper/commands/Install.java  | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/2ec2c283/wrapper/src/main/java/org/apache/karaf/wrapper/commands/Install.java
----------------------------------------------------------------------
diff --git a/wrapper/src/main/java/org/apache/karaf/wrapper/commands/Install.java b/wrapper/src/main/java/org/apache/karaf/wrapper/commands/Install.java
index 760cddb..3fbca78 100644
--- a/wrapper/src/main/java/org/apache/karaf/wrapper/commands/Install.java
+++ b/wrapper/src/main/java/org/apache/karaf/wrapper/commands/Install.java
@@ -221,6 +221,34 @@ public class Install implements Action {
                 System.out.println("   $ systemctl disable " + name);
             }
 
+        } else if (os.startsWith("Solaris") || os.startsWith("SunOS")) {
+            System.out.println("  To install the service:");
+            System.out.println("    $ ln -s " + serviceFile.getPath() + " /etc/init.d/");
+            System.out.println("");
+            System.out.println("  To start the service when the machine is rebooted for all multi-user run levels");
+            System.out.println("  and stopped for the halt, single-user and reboot runlevels:");
+            System.out.println("    $ ln -s /etc/init.d/" + serviceFile.getName() + " /etc/rc0.d/K20" + serviceFile.getName());
+            System.out.println("    $ ln -s /etc/init.d/" + serviceFile.getName() + " /etc/rc1.d/K20" + serviceFile.getName());
+            System.out.println("    $ ln -s /etc/init.d/" + serviceFile.getName() + " /etc/rc2.d/S20" + serviceFile.getName());
+            System.out.println("    $ ln -s /etc/init.d/" + serviceFile.getName() + " /etc/rc3.d/S20" + serviceFile.getName());
+            System.out.println("");
+            System.out.println("    If your application makes use of other services, then you will need to make");
+            System.out.println("    sure that your application is started after, and then shutdown before. This");
+            System.out.println("    is done by controlling the startup/shutdown order by setting the right order");
+            System.out.println("    value, which in this example it set to 20."); 
+            System.out.println("");
+            System.out.println("  To start the service:");
+            System.out.println("    $ /etc/init.d/" + serviceFile.getName() + " start");
+            System.out.println("");
+            System.out.println("  To stop the service:");
+            System.out.println("    $ /etc/init.d/" + serviceFile.getName() + " stop");
+            System.out.println("");
+            System.out.println("  To uninstall the service :");
+            System.out.println("    $ rm /etc/init.d/" + serviceFile.getName());
+            System.out.println("    $ rm /etc/rc0.d/K20" + serviceFile.getName());
+            System.out.println("    $ rm /etc/rc1.d/K20" + serviceFile.getName());
+            System.out.println("    $ rm /etc/rc2.d/K20" + serviceFile.getName());
+            System.out.println("    $ rm /etc/rc3.d/K20" + serviceFile.getName());
         }
 
         return null;