Add force-stop support to launch script

Update the embedded launch script to support `force-stop`.

Closes gh-6223
This commit is contained in:
Gaurav Rawat
2016-06-24 17:49:59 -04:00
committed by Phillip Webb
parent 3c930347c5
commit 509be7474d
4 changed files with 36 additions and 0 deletions

View File

@@ -118,6 +118,14 @@ public class SysVinitLaunchScriptIT {
.has(coloredString(AnsiColor.YELLOW, "Not running (pidfile not found)"));
}
@Test
public void forceStopWhenStopped() throws Exception {
String output = doTest("force-stop-when-stopped.sh");
assertThat(output).contains("Status: 0");
assertThat(output)
.has(coloredString(AnsiColor.YELLOW, "Not running (pidfile not found)"));
}
@Test
public void startWhenStarted() throws Exception {
String output = doTest("start-when-started.sh");

View File

@@ -0,0 +1,4 @@
source ./test-functions.sh
install_service
force_stop_service
echo "Status: $?"

View File

@@ -21,6 +21,10 @@ stop_service() {
service spring-boot-app stop
}
force_stop_service() {
service spring-boot-app force-stop
}
await_app() {
if [ -z $1 ]
then