Skip to content

Commit 0f650fc

Browse files
author
kohsuke
committed
1 parent 93bb4a6 commit 0f650fc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/src/main/java/hudson/lifecycle/Lifecycle.java

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ public void verifyRestartable() throws RestartNotSupportedException {
8383
"Default Windows lifecycle does not support restart.");
8484
}
8585
};
86+
} else if (System.getenv("SMF_FMRI")!=null && System.getenv("SMF_RESTARTER")!=null) {
87+
// when we are run by Solaris SMF, these environment variables are set.
88+
instance = new SolarisSMFLifecycle();
8689
} else {
8790
// if run on Unix, we can do restart
8891
try {

ips/hudson.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ THE SOFTWARE.
4545
</method_context>
4646

4747
<!-- Set the HUDSON_HOME env variable, and run the war file in /apps/hudson/hudson.war -->
48-
<exec_method type="method" name="start" exec="java -Xmx512m -Dhudson.lifecycle=hudson.lifecycle.SolarisSMFLifecycle -jar /usr/local/bin/hudson.war" timeout_seconds="0"/>
48+
<exec_method type="method" name="start" exec="java -Xmx512m -jar /usr/local/bin/hudson.war" timeout_seconds="0"/>
4949
<exec_method type="method" name="stop" exec=":kill -TERM" timeout_seconds="30"/>
5050

5151
<!-- We are going to be kicking off a single child process so we want Wait mode-->

0 commit comments

Comments
 (0)