aboutsummaryrefslogtreecommitdiff
path: root/rel
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-06-28 15:26:09 +0000
committerlain <lain@soykaf.club>2019-06-28 15:26:09 +0000
commit2286f62a36a0f5d738892a9283a696b8a45b45a6 (patch)
tree2585654bfd9c0803a4668dcf5d1b7d423783337e /rel
parentf5b015b998252da489da3ec76fd5dd75dbcb7435 (diff)
parenteeb419e3a0e8ad97b0061f5da9938bbf4f52c5c9 (diff)
downloadpleroma-2286f62a36a0f5d738892a9283a696b8a45b45a6.tar.gz
Merge branch 'release-docs' into 'develop'
Docs on OTP releases See merge request pleroma/pleroma!1315
Diffstat (limited to 'rel')
-rwxr-xr-xrel/files/bin/pleroma_ctl2
-rwxr-xr-xrel/files/installation/init.d/pleroma21
-rw-r--r--rel/files/installation/pleroma.service36
3 files changed, 58 insertions, 1 deletions
diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl
index b0e1874a9..9c67b209b 100755
--- a/rel/files/bin/pleroma_ctl
+++ b/rel/files/bin/pleroma_ctl
@@ -2,7 +2,7 @@
# XXX: This should be removed when elixir's releases get custom command support
detect_flavour() {
- arch="$(arch)"
+ arch="$(uname -m)"
if [ "$arch" = "x86_64" ]; then
arch="amd64"
elif [ "$arch" = "armv7l" ]; then
diff --git a/rel/files/installation/init.d/pleroma b/rel/files/installation/init.d/pleroma
new file mode 100755
index 000000000..dea1db26c
--- /dev/null
+++ b/rel/files/installation/init.d/pleroma
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+
+supervisor=supervise-daemon
+
+# Requires OpenRC >= 0.35
+directory=/opt/pleroma
+
+command=/opt/pleroma/bin/pleroma
+command_args="start"
+command_user=pleroma
+command_background=1
+
+# Ask process to terminate within 30 seconds, otherwise kill it
+retry="SIGTERM/30/SIGKILL/5"
+
+pidfile="/var/run/pleroma.pid"
+
+depend() {
+ want nginx
+ need postgresql
+}
diff --git a/rel/files/installation/pleroma.service b/rel/files/installation/pleroma.service
new file mode 100644
index 000000000..e47cf58dc
--- /dev/null
+++ b/rel/files/installation/pleroma.service
@@ -0,0 +1,36 @@
+[Unit]
+Description=Pleroma social network
+After=network.target postgresql.service nginx.service
+
+[Service]
+KillMode=process
+Restart=on-failure
+
+; Name of the user that runs the Pleroma service.
+User=pleroma
+
+; Make sure that all paths fit your installation.
+; Path to the home directory of the user running the Pleroma service.
+Environment="HOME=/opt/pleroma"
+; Path to the folder containing the Pleroma installation.
+WorkingDirectory=/opt/pleroma
+; Path to the Pleroma binary.
+ExecStart=/opt/pleroma/bin/pleroma start
+ExecStop=/opt/pleroma/bin/pleroma stop
+
+; Some security directives.
+; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.
+PrivateTmp=true
+; 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.
+ProtectHome=true
+; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
+ProtectSystem=full
+; 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.
+PrivateDevices=false
+; Ensures that the service process and all its children can never gain new privileges through execve().
+NoNewPrivileges=true
+; Drops the sysadmin capability from the daemon.
+CapabilityBoundingSet=~CAP_SYS_ADMIN
+
+[Install]
+WantedBy=multi-user.target