summaryrefslogtreecommitdiff
path: root/net-mail/stalwart-mail/files/stalwart-mail.initd
blob: 2b2b926423edf98d1e76c6917abf40036c4d3a4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/sbin/openrc-run
# Copyright 2007-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

command=${RC_PREFIX}/usr/bin/stalwart-mail
pidfile=${RC_PREFIX}/var/run/stalwart-mail/pid
command_args="--config /opt/stalwart-mail/etc/config.toml"
command_background="yes"
name="Stalwart mail server"

depend()
{
	need net
	use postgresql mysql
	before provide mta
}

start_pre()
{
	checkpath -d -m 0755 -o stalwart-mail:stalwart-mail `dirname ${pidfile}`
}