Comment and format the systemd unit to make it more readable
This commit is contained in:
parent
4d39a0f357
commit
8cb818ea0a
|
@ -168,18 +168,27 @@ On peut activer une unité [systemd](HowtoSystemd) pour faire tourner un service
|
|||
|
||||
Par exemple, via `/etc/systemd/system/jdoe.js.service` :
|
||||
|
||||
~~~
|
||||
~~~ { .ini }
|
||||
[Unit]
|
||||
Description=Example.com
|
||||
[Service]
|
||||
# Run the service as user jdoe and group jdoe
|
||||
User=jdoe
|
||||
Group=jdoe
|
||||
|
||||
WorkingDirectory=/home/jdoe/www
|
||||
# A script that start the application, should NOT fork and exit (because of the service type being simple).
|
||||
# (forking and waiting for the node process to die is OK but exec() or equivalent is generally better)
|
||||
ExecStart=/home/jdoe/www/start
|
||||
|
||||
# Restart if the process die or if it is killed by something else than systemd
|
||||
Restart=always
|
||||
|
||||
# For logging
|
||||
StandardOutput=/home/jdoe/log/nodejs-access.log
|
||||
StandardError=/home/jdoe/log/nodejs-error.log
|
||||
SyslogIdentifier=example.com
|
||||
User=jdoe
|
||||
Group=jdoe
|
||||
|
||||
# Allow many incoming connections
|
||||
LimitNOFILE=infinity
|
||||
|
||||
|
|
Loading…
Reference in a new issue