added init script

This commit is contained in:
Manuel Friedli 2008-01-14 01:05:43 +00:00
parent e566e6d019
commit ac93303774
2 changed files with 28 additions and 1 deletions

View 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 $?
}

View file

@ -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"
} }