diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /net-im/prosody/files | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'net-im/prosody/files')
-rw-r--r-- | net-im/prosody/files/prosody-0.12.0-gentoo.patch | 29 | ||||
-rw-r--r-- | net-im/prosody/files/prosody.initd-r6 | 46 | ||||
-rw-r--r-- | net-im/prosody/files/prosody.service-r3 | 17 | ||||
-rw-r--r-- | net-im/prosody/files/prosody.tmpfilesd-r2 | 1 |
4 files changed, 93 insertions, 0 deletions
diff --git a/net-im/prosody/files/prosody-0.12.0-gentoo.patch b/net-im/prosody/files/prosody-0.12.0-gentoo.patch new file mode 100644 index 000000000000..3b2ba75b15c8 --- /dev/null +++ b/net-im/prosody/files/prosody-0.12.0-gentoo.patch @@ -0,0 +1,29 @@ +--- a/prosody.cfg.lua.dist ++++ b/prosody.cfg.lua.dist +@@ -17,6 +17,15 @@ + -- Settings in this section apply to the whole server and are the default settings + -- for any virtual hosts + ++-- Prosody will use this user and group for launching the service. ++-- Gentoo uses by default prosody:prosody (uid:gid) for all Jabber related services. ++prosody_user = "prosody" ++prosody_group = "prosody" ++ ++-- Prosody will create this pid file after it has been successfully started. ++-- Please don't change that path, as it's being used by the Gentoo init scripts. ++pidfile = "/run/prosody/prosody.pid" ++ + -- This is a (by default, empty) list of accounts that are admins + -- for the server. Note that you must create the accounts separately + -- (see https://prosody.im/doc/creating_accounts for info) +@@ -26,7 +35,9 @@ + -- This option allows you to specify additional locations where Prosody + -- will search first for modules. For additional modules you can install, see + -- the community module repository at https://modules.prosody.im/ +---plugin_paths = {} ++-- The default included path is for the optional net-im/prosody-modules package, ++-- which provides additional community maintained modules. ++plugin_paths = { "/usr/GENTOO_LIBDIR/prosody/modules", "/usr/GENTOO_LIBDIR/prosody/community-modules" }; + + -- This is the list of modules Prosody will load on startup. + -- Documentation for bundled modules can be found at: https://prosody.im/doc/modules diff --git a/net-im/prosody/files/prosody.initd-r6 b/net-im/prosody/files/prosody.initd-r6 new file mode 100644 index 000000000000..e4138c597b23 --- /dev/null +++ b/net-im/prosody/files/prosody.initd-r6 @@ -0,0 +1,46 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +name="Prosody XMPP server" +prosody_config="/etc/prosody/prosody.cfg.lua" +prosody_data="/var/lib/prosody" +prosody_logs="/var/log/prosody" +prosody_pid="/run/prosody" +pidfile="${prosody_pid}/prosody.pid" + +command="/usr/bin/prosody" +command_args="--daemonize" +commandctl="/usr/bin/prosodyctl" +command_group="prosody" +command_user="prosody" + +checkconfig() { + if [ ! -f "${prosody_config}" ]; then + eerror "Please create ${prosody_config} before starting Prosody!" + return 1 + fi + + ${commandctl} check config + return $? +} + +depend() { + need net + use dns postgresql +} + +reload() { + ebegin "Reloading configuration" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} + +start_pre() { + checkconfig || return 1 + + checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${prosody_data}" + checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${prosody_logs}" + checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${prosody_pid}" +} diff --git a/net-im/prosody/files/prosody.service-r3 b/net-im/prosody/files/prosody.service-r3 new file mode 100644 index 000000000000..dec39e4b0b22 --- /dev/null +++ b/net-im/prosody/files/prosody.service-r3 @@ -0,0 +1,17 @@ +[Unit] +Description=Prosody XMPP server +After=network.target + +[Service] +Group=prosody +PIDFile=/run/prosody/prosody.pid +ExecStart=/usr/bin/prosody --daemonize +ExecReload=/bin/kill -HUP $MAINPID +User=prosody +ExecStartPre=!/bin/mkdir -p /var/log/prosody +ExecStartPre=!/bin/mkdir -p /var/lib/prosody +ExecStartPre=!/bin/chown -R prosody /var/log/prosody +ExecStartPre=!/bin/chown -R prosody /var/lib/prosody + +[Install] +WantedBy=multi-user.target diff --git a/net-im/prosody/files/prosody.tmpfilesd-r2 b/net-im/prosody/files/prosody.tmpfilesd-r2 new file mode 100644 index 000000000000..78949f3db82c --- /dev/null +++ b/net-im/prosody/files/prosody.tmpfilesd-r2 @@ -0,0 +1 @@ +d /run/prosody 750 prosody prosody - - |