diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-02-17 07:53:26 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-02-17 07:53:31 +0000 |
commit | bad39dbabff1ea1b4d795d22cc9d7ecfb87c920a (patch) | |
tree | 134bcfc7d6190df0f6e9d668de484a5f7b2500ad | |
parent | 167441e8b2235c0bf0776e319e1bcb41c60eda47 (diff) | |
download | aports-bad39dbabff1ea1b4d795d22cc9d7ecfb87c920a.tar.bz2 aports-bad39dbabff1ea1b4d795d22cc9d7ecfb87c920a.tar.xz |
testing/prosody: fixes for init, added lua in depends
-rw-r--r-- | testing/prosody/APKBUILD | 10 | ||||
-rw-r--r-- | testing/prosody/prosody.initd | 57 |
2 files changed, 35 insertions, 32 deletions
diff --git a/testing/prosody/APKBUILD b/testing/prosody/APKBUILD index 814cdabeb0..1e49cbbe62 100644 --- a/testing/prosody/APKBUILD +++ b/testing/prosody/APKBUILD @@ -3,13 +3,13 @@ _luaver=5.1 pkgname=prosody pkgver=0.9.10 -pkgrel=0 +pkgrel=1 pkgdesc="Lua based Jabber/XMPP server" url="http://prosody.im/" arch="all" license="MIT" depends="lua${_luaver}-socket lua${_luaver}-expat lua${_luaver}-filesystem - lua${_luaver}-sec lua${_luaver}" + lua${_luaver}-sec lua${_luaver} lua" makedepends="lua${_luaver}-dev libidn-dev openssl-dev" install="prosody.pre-install" subpackages="$pkgname-doc" @@ -55,10 +55,10 @@ package() { md5sums="ef6d4a9e6dcae577eb52f7277d7beac5 prosody-0.9.10.tar.gz b839353efd51b724723f0f4293f76bfb prosody.cfg.lua.patch -9b68b81deb2148a3a6c3b5d2eb9c96b9 prosody.initd" +413897e00f00c58bb8cbe59736291ef8 prosody.initd" sha256sums="4836eefed4d9bbb632cba24ac5bd8e9bc7c029a79d06084b00ffc70858d1662f prosody-0.9.10.tar.gz 8653ccb14a0a5e27fee95b5baf412158543f619f6ca54fd7630c8d333ddddadd prosody.cfg.lua.patch -0db9babd65354fe8693d1233945da61ebbea525915f881cf601211110ea50b08 prosody.initd" +aaad1d10168e27e10ced38963d5bbeb0c7988bf58a2e74f02a103a3318047e1d prosody.initd" sha512sums="4453fb596704b6a248a52dedc00cfc77edbee1fad502f1197b04c2148092389a294c152c3ba36203f51831d51ee2b915c15382ac86fcff4f35696ecacf926574 prosody-0.9.10.tar.gz 950d9b53887d859b7d64986ba3817f92fb45ed1b653998759458156197b9623f1cc240559da071e20992f7aa497ef37d422da2168aa5b3c4ea3946482d160f41 prosody.cfg.lua.patch -95f46dde7e066a93429c46a8ac42698af3754ebe0ed89c7dc86fad042d68264695f4270ecc5a9dabec2b5c2f989928e50b0556ccbcc513ff73ddbb5e01b47dfe prosody.initd" +11b0f5e4fa488e047c26aa5e51c35983100cdbf7ebbf7c8b6d003c8db7f52e797f93e4744d54b3094c82d722d5e4de62b5734376cb5e69a4c6127f8cb07a4347 prosody.initd" diff --git a/testing/prosody/prosody.initd b/testing/prosody/prosody.initd index 1a41d4a9e2..c0557bd812 100644 --- a/testing/prosody/prosody.initd +++ b/testing/prosody/prosody.initd @@ -1,44 +1,47 @@ -#!/sbin/runscript +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ -# Sample init.d file for alpine linux. - -NAME=prosody -DAEMON=/usr/bin/$NAME +description="Prosody is a server for prosody/XMPP written in Lua." +description_reload="Reload configuration and reopen log files." +extra_started_commands="reload" +pidfile="/var/run/prosody/prosody.pid" depend() { + use dns need net - after firewall + provide prosody-server +} + +checkconfig() { + if [ ! -e /etc/prosody/prosody.cfg.lua ] ; then + eerror "You need a /etc/prosody/prosody.cfg.lua file to run prosody" + return 1 + fi + luac -p /etc/prosody/prosody.cfg.lua + return $? } start() { - ebegin "Starting ${NAME}" - /usr/bin/prosodyctl start -# start-stop-daemon --start --quiet --background \ -# --make-pidfile --pidfile /var/run/${NAME}/${NAME}.pid \ -# --user ${USER}:${GROUP} \ -# --exec ${DAEMON} -- ${OPTS} + checkconfig || return 1 + checkpath -q -d -m 0770 -o prosody:prosody "$(dirname ${pidfile})" + checkpath -q -f -m 0770 -o prosody:prosody "${pidfile}" + checkpath -q -d -m 0750 -o prosody:prosody /var/log/prosody + ebegin "Starting Prosody XMPP Server" + prosodyctl start eend $? } stop() { - ebegin "Stopping ${NAME}" - /usr/bin/prosodyctl stop -# start-stop-daemon --stop --quiet \ -# --exec ${DAEMON} \ -# --pidfile /var/run/${NAME}/${NAME}.pid \ + ebegin "Stopping Prosody XMPP Server" + prosodyctl stop eend $? } reload() { - ebegin "Reloading ${NAME}" - if ! service_started "${NAME}" ; then - eend 1 "${NAME} is not started" - return 1 - fi - /usr/bin/prosodyctl stop - /usr/bin/prosodyctl start -# start-stop-daemon --stop --oknodo --signal HUP \ -# --exec ${DAEMON} --pidfile /var/run/${NAME}/${NAME}.pid + checkconfig || return 1 + ebegin "Reloading configuration of Prosody XMPP Server" + prosodyctl reload eend $? } - |