aboutsummaryrefslogtreecommitdiffstats
path: root/net-irc/qwebirc/files/init-script
blob: 2b35b6a65a633d25cd7692c2da0a729af5a13e6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: qwebirc.initd,v 1.0 2011/03/11 12:11:50 lkraav Exp $

SVCHOME="/var/www/qwebirc"
LOGFILE="/var/log/qwebirc"

depend() {
	use net
	need localmount
	after bootmisc
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --start --chuid qwebirc:qwebirc --chdir ${SVCHOME} \
		--quiet --exec ${SVCHOME}/run.py \
		-- -l ${LOGFILE} -p ${PORT} -P /var/run/qwebirc/${SVCNAME}.pid
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --quiet --pidfile /var/run/qwebirc/${SVCNAME}.pid
	eend $?
}