author | Luke Hoersten <luke@hoersten.org> |
Sun, 19 Jan 2020 13:41:08 -0600 | |
changeset 84 | d0c40727e6ff |
parent 78 | roles/pleroma/templates/pleroma.service.j2@18b6a82be777 |
child 85 | dcfd23308c32 |
permissions | -rw-r--r-- |
60 | 1 |
[Unit] |
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
2 |
Description=Pleroma social network instance %I |
60 | 3 |
After=network.target postgresql.service |
4 |
||
5 |
[Service] |
|
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
6 |
User=pleroma |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
7 |
WorkingDirectory=/opt/pleroma |
78 | 8 |
|
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
9 |
Environment="HOME=/opt/pleroma" |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
10 |
Environment="PLEROMA_CONFIG_PATH=/etc/pleroma/%i.config.exs" |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
11 |
Environment="PLUG_TMPDIR=/tmp/%i" |
78 | 12 |
|
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
13 |
ExecStart=/opt/pleroma/bin/pleroma daemon |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
78
diff
changeset
|
14 |
ExecReload=/opt/pleroma/bin/pleroma stop |
60 | 15 |
KillMode=process |
16 |
Restart=on-failure |
|
17 |
||
78 | 18 |
; Some security directives. |
19 |
; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops. |
|
20 |
PrivateTmp=true |
|
21 |
; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Pleroma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to false. |
|
22 |
ProtectHome=false |
|
23 |
; Mount /usr, /boot, and /etc as read-only for processes invoked by this service. |
|
24 |
ProtectSystem=full |
|
25 |
; Sets up a new /dev mount for the process and only adds API pseudo devices like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled by default because it may not work on devices like the Raspberry Pi. |
|
26 |
PrivateDevices=false |
|
27 |
; Ensures that the service process and all its children can never gain new privileges through execve(). |
|
28 |
NoNewPrivileges=true |
|
29 |
; Drops the sysadmin capability from the daemon. |
|
30 |
CapabilityBoundingSet=~CAP_SYS_ADMIN |
|
31 |
||
60 | 32 |
[Install] |
33 |
WantedBy=multi-user.target |