Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
SWARM-1757 - chkconfig does not configure runlevels properly (#751)
Browse files Browse the repository at this point in the history
* SWARM-1533 - Swarm fails to create if path to .m2/repository has spaces

* Added extra check to avoid error when start-stop-daemon is missing
Adding support for chkconfig
  • Loading branch information
nelsongraca authored and kenfinnigan committed Dec 31, 2017
1 parent 9a623f5 commit 695f1f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/src/main/resources/org/wildfly/swarm/tools/launch.sh
@@ -1,5 +1,9 @@
#!/bin/bash

## chkconfig
# chkconfig: 345 90 90
# description: Runs a Wildfly Swarm app

[[ -n "$DEBUG" ]] && set -x

# Initialize variables that cannot be provided by a .conf file
Expand Down Expand Up @@ -115,7 +119,7 @@ command="$javaexe -Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -ja


#check if start-stop-daemon has support for --no-close (to support older systems)
noClose=$(if [[ $(start-stop-daemon --help | grep \\-\\-no-close; echo $?) == 0 ]]; then echo --no-close; fi)
noClose=$(if [[ $(type start-stop-daemon > /dev/null 2>&1 && start-stop-daemon --help | grep \\-\\-no-close; echo $?) == 0 ]]; then echo --no-close; fi)

# Action functions
start() {
Expand Down

0 comments on commit 695f1f5

Please sign in to comment.