added init script
This commit is contained in:
parent
e566e6d019
commit
ac93303774
2 changed files with 28 additions and 1 deletions
23
net-im/palaver/files/palaver-0.5-initd
Normal file
23
net-im/palaver/files/palaver-0.5-initd
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/sbin/runscript
|
||||||
|
# Copyright 1999-2007 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
use jabber-server
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting Palaver MUC service"
|
||||||
|
start-stop-daemon --start --pidfile /var/run/jabber/palaver.pid --chuid jabber:jabber \
|
||||||
|
--exec /usr/bin/twistd -- -f /etc/jabber/palaver.tap -l /var/log/jabber/palaver.log \
|
||||||
|
--pidfile /var/run/jabber/palaver.pid
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping Palaver MUC service"
|
||||||
|
start-stop-daemon --stop --quiet --pidfile /var/run/jabber/palaver.pid
|
||||||
|
eend $?
|
||||||
|
}
|
|
@ -34,11 +34,12 @@ src_install() {
|
||||||
dosed \
|
dosed \
|
||||||
"s:<spool>[^\<]*</spool>:<spool>/var/spool/jabber</spool>:" \
|
"s:<spool>[^\<]*</spool>:<spool>/var/spool/jabber</spool>:" \
|
||||||
/etc/jabber/${PN}.xml
|
/etc/jabber/${PN}.xml
|
||||||
|
|
||||||
# dosed \
|
# dosed \
|
||||||
# "s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
|
# "s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
|
||||||
# /etc/jabber/${PN}.xml
|
# /etc/jabber/${PN}.xml
|
||||||
|
|
||||||
# newinitd "${FILESDIR}/${PN}-0.8-initd" ${PN}
|
newinitd "${FILESDIR}/${P}-initd" ${PN}
|
||||||
# dosed "s:INSPATH:${inspath}:" /etc/init.d/${PN}
|
# dosed "s:INSPATH:${inspath}:" /etc/init.d/${PN}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,4 +47,7 @@ src_install() {
|
||||||
post_install() {
|
post_install() {
|
||||||
einfo "A sample config file has been installes into /etc/jabber/${PN}.xml."
|
einfo "A sample config file has been installes into /etc/jabber/${PN}.xml."
|
||||||
einfo "Please adjust the settings as needed."
|
einfo "Please adjust the settings as needed."
|
||||||
|
einfo "After that, you need to create e TAP-file for twisted in order to start palaver, like this:"
|
||||||
|
einfo "# cd /etc/jabber"
|
||||||
|
einfo "# mktap palaver -c palaver.xml"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue