Commit 59d2ae59 authored by Vedran Pavic's avatar Vedran Pavic Committed by Andy Wilkinson

Update documentation to clarify systemd service user

Closes gh-4293
parent aa3313cf
...@@ -385,8 +385,8 @@ Systemd is the successor to `init.d` scripts, and now being used by many many mo ...@@ -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`: ...@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment