summaryrefslogtreecommitdiff
blob: 2575d92b4402882d53793aba781950469366ec53 (plain)
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
28
29
30
31
32
33
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

SOGOD_PID=/run/sogo/sogod.pid

depend() {
	need net
	after postgresql mysql
	after slapd
	after mta
	after memcached
}

start() {
	checkpath -q -d -m 0755 -o sogo:sogo $(dirname "${SOGOD_PID}")
	ebegin "Starting SOGo service"
	start-stop-daemon --start --quiet \
		--user sogo --exec /usr/sbin/sogod \
		--	-WOWorkersCount ${SOGOD_WORKERS} \
			-WOLogFile /var/log/sogo/sogod.log \
			-WOPidFile "${SOGOD_PID}" \
			"${SOGOD_OPTS}"
	eend ${?}
}

stop() {
	ebegin "Stopping SOGo service"
	start-stop-daemon --stop \
		--pidfile "${SOGOD_PID}"
	eend ${?}
}