You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-mail/cyrus-imapd/files/cyrus.rc8

34 lines
716 B

#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use net
use dns logger
after drac saslauthd
}
checkdirs() {
for dir in /run/cyrus /run/cyrus/proc /run/cyrus/lock /run/cyrus/socket /run/cyrus/sync; do
checkpath -q -d -o cyrus:mail -m 0750 "${dir}" || {
eerror "Failed to create directory at $dir"
return 1
}
done
}
start() {
checkdirs || return 1
ebegin "Starting cyrus imapd"
start-stop-daemon --start --quiet --background \
--exec /usr/libexec/cyrusmaster -- ${CYRUS_OPTS}
eend $?
}
stop() {
ebegin "Stopping cyrus imapd"
start-stop-daemon --stop --quiet --pidfile /run/cyrus-master.pid
eend $?
}