1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-20 09:45:12 +03:00
aports/testing/maddy/maddy.initd
2020-10-23 20:49:54 +00:00

36 lines
761 B
Text

#!/sbin/openrc-run
supervisor=supervise-daemon
name="maddy"
description="Composable all-in-one mail server"
description_log_reopen="Reopen log files"
description_reload="Reload some files from disk (but without main configuration)"
command=/usr/bin/maddy
command_args="$maddy_opts"
command_user=maddy:maddy
# make relative paths in config relative to the state directory
directory="/var/lib/$RC_SVCNAME"
extra_started_commands="log_reopen reload"
depend() {
need net localmount
after firewall
}
log_reopen() {
ebegin "Reopening log files of $name"
supervise-daemon $RC_SVCNAME --signal USR1
eend $?
}
reload() {
ebegin "Reloading $name"
supervise-daemon $RC_SVCNAME --signal USR2
eend $?
}
start_pre() {
checkpath -d -o maddy:maddy /run/maddy
}