2020-05-27 16:34:06 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-06-01 15:07:35 +00:00
|
|
|
# Install DMA
|
2020-06-01 17:21:41 +00:00
|
|
|
case $(cat "${__global}/explorer/os")
|
2020-06-01 15:07:35 +00:00
|
|
|
in
|
|
|
|
(debian|devuan|ubuntu)
|
|
|
|
__package dma --state present
|
|
|
|
export require='__package/dma'
|
2020-05-27 16:34:06 +00:00
|
|
|
;;
|
2020-06-01 15:07:35 +00:00
|
|
|
(freebsd)
|
|
|
|
# Stop sendmail if necessary
|
|
|
|
__process 'sendmail' --name 'sendmail.*' --state absent \
|
|
|
|
--stop '/etc/rc.d/sendmail onestop'
|
|
|
|
|
|
|
|
# ... and disable it
|
|
|
|
__key_value 'rcconf-sendmail-enable' --file '/etc/rc.conf' \
|
|
|
|
--key 'sendmail_enable' --delimiter '=' --value '"NONE"' \
|
|
|
|
--exact_delimiter
|
2020-05-27 16:34:06 +00:00
|
|
|
|
|
|
|
# Setup mailwrapper accordingly
|
2020-06-01 15:07:35 +00:00
|
|
|
__file '/etc/mail/mailer.conf' --mode 0644 --source - <<-'EOF'
|
|
|
|
sendmail /usr/libexec/dma
|
|
|
|
send-mail /usr/libexec/dma
|
|
|
|
mailq /usr/libexec/dma
|
|
|
|
newaliases /usr/libexec/dma
|
|
|
|
rmail /usr/libexec/dma
|
|
|
|
EOF
|
|
|
|
;;
|
|
|
|
(*)
|
|
|
|
cat <<EOF >&2
|
2020-05-27 16:34:06 +00:00
|
|
|
Your OS (${os}) is not supported yet.
|
|
|
|
|
|
|
|
Maybe adding support is as simple as adapting the packages or allowing it,
|
|
|
|
we highly encourage you to open a PR with the necessary changes.
|
|
|
|
See: https://code.ungleich.ch/ungleich-public/cdist-contrib/
|
|
|
|
EOF
|
|
|
|
exit 1
|
2020-06-01 15:07:35 +00:00
|
|
|
;;
|
2020-05-27 16:34:06 +00:00
|
|
|
esac
|