__opendkim: fix start_on_boot on FreeBSD

There was a bit of an oddity with this, it is implemented in a way
that should not be an issue for other systems.
This commit is contained in:
evilham 2024-05-16 12:36:40 +02:00
parent 3f34a674b0
commit bebd83cfa6
Signed by: evilham
GPG key ID: AE3EE30D970886BF

View file

@ -29,6 +29,7 @@ case "$os" in
'freebsd') 'freebsd')
CFG_DIR="/usr/local/etc/mail" CFG_DIR="/usr/local/etc/mail"
service="milter-opendkim" service="milter-opendkim"
start_service="milteropendkim"
;; ;;
*) *)
printf "__opendkim does not yet support %s.\n" "$os" >&2 printf "__opendkim does not yet support %s.\n" "$os" >&2
@ -90,7 +91,7 @@ fi
require="__package/opendkim" __file "$target_file" \ require="__package/opendkim" __file "$target_file" \
--source "$source_file" --mode 0644 --source "$source_file" --mode 0644
require="__package/opendkim" __start_on_boot "${service}" require="__package/opendkim" __start_on_boot "${start_service:-${service}}"
# Ensure Key and Signing tables exist and have proper permissions # Ensure Key and Signing tables exist and have proper permissions
key_table="${CFG_DIR}/KeyTable" key_table="${CFG_DIR}/KeyTable"
@ -105,7 +106,7 @@ require="__package/opendkim" \
--mode 444 --mode 444
require="__file${target_file} __file${key_table} require="__file${target_file} __file${key_table}
__file${signing_table} __start_on_boot/${service}" \ __file${signing_table} __start_on_boot/${start_service:-${service}}" \
__check_messages opendkim \ __check_messages opendkim \
--pattern "^__file${target_file}" \ --pattern "^__file${target_file}" \
--execute "service ${service} restart" --execute "service ${service} restart"