Skip to content

Commit 2bbdc53

Browse files
committed
Fix systemd example configuration
Closes gh-42795
1 parent c9e16dc commit 2bbdc53

File tree

1 file changed

+4
-5
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment

1 file changed

+4
-5
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/installing.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ The following script offers an example:
2222
User=myapp
2323
Group=myapp
2424
25-
Environment="JAVA_HOME=/path/to/java/home"
26-
27-
ExecStart=${JAVA_HOME}/bin/java -jar /var/myapp/myapp.jar
28-
ExecStop=/bin/kill -15 $MAINPID
25+
Type=exec
26+
ExecStart=/path/to/java/home/bin/java -jar /var/myapp/myapp.jar
27+
WorkingDirectory=/var/myapp
2928
SuccessExitStatus=143
3029
3130
[Install]
3231
WantedBy=multi-user.target
3332
----
3433

35-
IMPORTANT: Remember to change the `Description`, `User`, `Group`, `Environment` and `ExecStart` fields for your application.
34+
IMPORTANT: Remember to change the `Description`, `User`, `Group`, `ExecStart` and `WorkingDirectory` fields for your application.
3635

3736
NOTE: The `ExecStart` field does not declare the script action command, which means that the `run` command is used by default.
3837

0 commit comments

Comments
 (0)