mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 20:46:39 +02:00
37 lines
802 B
Bash
37 lines
802 B
Bash
#!/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="run $maddy_opts"
|
|
command_user=maddy:maddy
|
|
capabilities="^cap_net_bind_service"
|
|
|
|
# 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
|
|
}
|