Update documentation to clarify systemd service user

Closes gh-4293
This commit is contained in:
Vedran Pavic 2015-10-24 01:44:34 +02:00 committed by Andy Wilkinson
parent aa3313cfc5
commit 59d2ae598b
1 changed files with 3 additions and 2 deletions

View File

@ -385,8 +385,8 @@ Systemd is the successor to `init.d` scripts, and now being used by many many mo
distributions. Although you can continue to use `init.d` script with `systemd`, it is also distributions. Although you can continue to use `init.d` script with `systemd`, it is also
possible to launch Spring Boot applications using `systemd` '`service`' scripts. possible to launch Spring Boot applications using `systemd` '`service`' scripts.
For example, to run a Spring Boot application installed in `var/myapp` you can add the For example, to run a Spring Boot application installed in `var/myapp` as user `myapp` you
following script in `/etc/systemd/system/myapp.service`: can add the following script in `/etc/systemd/system/myapp.service`:
[indent=0] [indent=0]
---- ----
@ -395,6 +395,7 @@ following script in `/etc/systemd/system/myapp.service`:
After=syslog.target After=syslog.target
[Service] [Service]
User=myapp
ExecStart=/var/myapp/myapp.jar ExecStart=/var/myapp/myapp.jar
[Install] [Install]