Skip to content

Commit 59d2ae5

Browse files
vpavicwilkinsona
authored andcommitted
Update documentation to clarify systemd service user
Closes gh-4293
1 parent aa3313c commit 59d2ae5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-docs/src/main/asciidoc/deployment.adoc

+3-2
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ Systemd is the successor to `init.d` scripts, and now being used by many many mo
385385
distributions. Although you can continue to use `init.d` script with `systemd`, it is also
386386
possible to launch Spring Boot applications using `systemd` '`service`' scripts.
387387

388-
For example, to run a Spring Boot application installed in `var/myapp` you can add the
389-
following script in `/etc/systemd/system/myapp.service`:
388+
For example, to run a Spring Boot application installed in `var/myapp` as user `myapp` you
389+
can add the following script in `/etc/systemd/system/myapp.service`:
390390

391391
[indent=0]
392392
----
@@ -395,6 +395,7 @@ following script in `/etc/systemd/system/myapp.service`:
395395
After=syslog.target
396396
397397
[Service]
398+
User=myapp
398399
ExecStart=/var/myapp/myapp.jar
399400
400401
[Install]

0 commit comments

Comments
 (0)