Handle relative pid folder correctly in the launch script
Previously, a relative PID folder was not handled correctly when running stop, status, or force_reload. This meant that a service could be started when configured to use a relative pid file, but then could not be stopped. The PID folder should be treated as relative to the service's jar file. This commit updates stop, status, and force_reload to push the jar file's directory so that this is now the case for those three commands. Closes gh-7092pull/7262/head
parent
7968c6b548
commit
03deff9a1c
@ -1,6 +1,6 @@
|
|||||||
source ./test-functions.sh
|
source ./test-functions.sh
|
||||||
echo 'JAVA_OPTS="-Dserver.port=8081 -Dserver.context-path=/test"' > /spring-boot-app.conf
|
|
||||||
install_service
|
install_service
|
||||||
|
echo 'JAVA_OPTS="-Dserver.port=8081 -Dserver.context-path=/test"' > /test-service/spring-boot-app.conf
|
||||||
start_service
|
start_service
|
||||||
await_app http://127.0.0.1:8081/test/
|
await_app http://127.0.0.1:8081/test/
|
||||||
curl -s http://127.0.0.1:8081/test/
|
curl -s http://127.0.0.1:8081/test/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
source ./test-functions.sh
|
source ./test-functions.sh
|
||||||
echo 'RUN_ARGS="--server.port=8081 --server.context-path=/test"' > /spring-boot-app.conf
|
|
||||||
install_service
|
install_service
|
||||||
|
echo 'RUN_ARGS="--server.port=8081 --server.context-path=/test"' > /test-service/spring-boot-app.conf
|
||||||
start_service
|
start_service
|
||||||
await_app http://127.0.0.1:8081/test/
|
await_app http://127.0.0.1:8081/test/
|
||||||
curl -s http://127.0.0.1:8081/test/
|
curl -s http://127.0.0.1:8081/test/
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
source ./test-functions.sh
|
||||||
|
mkdir ./pid
|
||||||
|
install_service
|
||||||
|
echo 'PID_FOLDER=./pid' > /test-service/spring-boot-app.conf
|
||||||
|
start_service
|
||||||
|
echo "PID: $(cat /test-service/pid/spring-boot-app/spring-boot-app.pid)"
|
||||||
|
await_app
|
||||||
|
curl -s http://127.0.0.1:8080/
|
||||||
|
status_service
|
||||||
|
stop_service
|
@ -1,6 +1,6 @@
|
|||||||
source ./test-functions.sh
|
source ./test-functions.sh
|
||||||
echo 'JAVA_OPTS=-Dserver.port=8081' > /spring-boot-app.conf
|
|
||||||
install_service
|
install_service
|
||||||
|
echo 'JAVA_OPTS=-Dserver.port=8081' > /test-service/spring-boot-app.conf
|
||||||
start_service
|
start_service
|
||||||
await_app http://127.0.0.1:8081/
|
await_app http://127.0.0.1:8081/
|
||||||
curl -s http://127.0.0.1:8081/
|
curl -s http://127.0.0.1:8081/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
source ./test-functions.sh
|
source ./test-functions.sh
|
||||||
echo 'RUN_ARGS=--server.port=8081' > /spring-boot-app.conf
|
|
||||||
install_service
|
install_service
|
||||||
|
echo 'RUN_ARGS=--server.port=8081' > /test-service/spring-boot-app.conf
|
||||||
start_service
|
start_service
|
||||||
await_app http://127.0.0.1:8081/
|
await_app http://127.0.0.1:8081/
|
||||||
curl -s http://127.0.0.1:8081/
|
curl -s http://127.0.0.1:8081/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
source ./test-functions.sh
|
source ./test-functions.sh
|
||||||
chmod -x $(type -p start-stop-daemon)
|
chmod -x $(type -p start-stop-daemon)
|
||||||
echo 'USE_START_STOP_DAEMON=false' > /spring-boot-app.conf
|
|
||||||
install_service
|
install_service
|
||||||
|
echo 'USE_START_STOP_DAEMON=false' > /test-service/spring-boot-app.conf
|
||||||
start_service
|
start_service
|
||||||
await_app
|
await_app
|
||||||
curl -s http://127.0.0.1:8080/
|
curl -s http://127.0.0.1:8080/
|
||||||
|
Loading…
Reference in New Issue