2017-03-02 11:54:44 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
SOGOD_PID=/run/sogo/sogod.pid
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
need memcached
|
|
|
|
after postgresql mysql
|
|
|
|
after slapd
|
|
|
|
after mta
|
|
|
|
}
|
|
|
|
|
|
|
|
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} \
|
|
|
|
-WOPidFile "${SOGOD_PID}" \
|
2018-03-01 09:43:15 +01:00
|
|
|
"${SOGOD_LOGOPTS}" \
|
2017-03-02 11:54:44 +01:00
|
|
|
"${SOGOD_OPTS}"
|
|
|
|
eend ${?}
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping SOGo service"
|
|
|
|
start-stop-daemon --stop \
|
|
|
|
--pidfile "${SOGOD_PID}"
|
|
|
|
eend ${?}
|
|
|
|
}
|