aboutsummaryrefslogtreecommitdiff
path: root/net-im/prosody
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2020-09-13 04:42:19 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2020-09-13 04:42:19 +0000
commite626abca93fd54e3780550271ba4287f1fcb81f1 (patch)
tree3f6c097de508aace3d73727fffe14ed2f1dda681 /net-im/prosody
parent5d8d5ed373f64dba3d3f2d609dd1fc4ca903b13a (diff)
downloadports-e626abca93fd54e3780550271ba4287f1fcb81f1.tar.gz
ports-e626abca93fd54e3780550271ba4287f1fcb81f1.zip
net-im/prosody: Do not use prosodyctl in init script
* Apply shebangfix. * Update init script to directly control the Prosody daemon as using prosodyctl has been deprecated. [1] * Add pkg-message to clearly state that setting the pidfile option in prosody.cfg.lua is required. * Fix pkg-message formatting. [1] https://blog.prosody.im/prosody-0.11.6-released/ PR: 249276 Submitted by: Thomas Morper <thomas@beingboiled.info> (maintainer)
Notes
Notes: svn path=/head/; revision=548450
Diffstat (limited to 'net-im/prosody')
-rw-r--r--net-im/prosody/Makefile6
-rw-r--r--net-im/prosody/files/prosody.in21
-rw-r--r--net-im/prosody/pkg-message16
3 files changed, 22 insertions, 21 deletions
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile
index 2f41093fda7a..bfaf374eb5ef 100644
--- a/net-im/prosody/Makefile
+++ b/net-im/prosody/Makefile
@@ -3,6 +3,7 @@
PORTNAME= prosody
PORTVERSION= 0.11.6
+PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= https://prosody.im/downloads/source/
@@ -19,7 +20,8 @@ RUN_DEPENDS= ${LUA_REFMODLIBDIR}/socket/core.so:net/luasocket@${LUA_FLAVOR} \
${LUA_REFMODLIBDIR}/bit.so:devel/lua-bitop@${LUA_FLAVOR}
LIB_DEPENDS= libidn.so:dns/libidn
-USES= compiler:c11 cpe gmake lua:52 ssl
+USES= compiler:c11 cpe gmake lua:52 shebangfix ssl
+SHEBANG_FILES= prosody prosodyctl tools/migration/prosody-migrator.lua
LUA_PREMK= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix="${PREFIX}" \
@@ -43,7 +45,7 @@ GROUPS= ${USERS}
USE_RC_SUBR= prosody
SUB_FILES= pkg-deinstall
-SUB_LIST= USERS=${USERS} GROUPS=${GROUPS}
+SUB_LIST= USERS=${USERS} GROUPS=${GROUPS} LUA_PREFIX=${LUA_PREFIX} LUA_CMD=${LUA_CMD}
PLIST_SUB= PROSODY_USER=${USERS} \
PROSODY_USER_regex=\b${USERS}\b \
PROSODY_GROUP=${GROUPS} \
diff --git a/net-im/prosody/files/prosody.in b/net-im/prosody/files/prosody.in
index 54a3ac861a22..9350e34eede1 100644
--- a/net-im/prosody/files/prosody.in
+++ b/net-im/prosody/files/prosody.in
@@ -16,25 +16,16 @@
name="prosody"
rcvar="prosody_enable"
-command="%%PREFIX%%/bin/prosodyctl"
+command="%%PREFIX%%/bin/prosody"
+command_args="-D"
+command_interpreter="%%LUA_PREFIX%%/bin/%%LUA_CMD%%"
+extra_commands="reload"
+prosody_user="%%USERS%%"
+prosody_group="%%GROUPS%%"
load_rc_config $name
prosody_enable=${prosody_enable:-"NO"}
pidfile=${prosody_pidfile:-"/var/run/prosody/prosody.pid"}
-extra_commands="reload"
-start_cmd="prosody_cmd start"
-stop_cmd="prosody_cmd stop"
-reload_cmd="prosody_cmd reload"
-restart_cmd="prosody_cmd restart"
-status_cmd="prosody_cmd status"
-
-export PATH="%%PREFIX%%/bin:$PATH"
-
-prosody_cmd()
-{
- $command $1
-}
-
run_rc_command "$1"
diff --git a/net-im/prosody/pkg-message b/net-im/prosody/pkg-message
index c76d706efa78..f2125ab9c53b 100644
--- a/net-im/prosody/pkg-message
+++ b/net-im/prosody/pkg-message
@@ -1,12 +1,20 @@
[
{ type: install
message: <<EOM
- If you're running Prosody in a jail and experience problems, please add
- the following to the global section of your prosody.cfg.lua:
+If you're running Prosody in a jail and experience problems, please add
+the following to the global section of your prosody.cfg.lua:
- interfaces = { 'x.x.x.x' }
+interfaces = { 'x.x.x.x' }
- where 'x.x.x.x' is the public IP you wish Prosody to bind to.
+where 'x.x.x.x' is the public IP you wish Prosody to bind to.
+EOM
+},
+{ type: install
+ message: <<EOM
+Make sure your prosody.cfg.lua contains the following line
+or else the init script won't work:
+
+pidfile = "/var/run/prosody/prosody.pid"
EOM
}
]