Files
kumomta/assets/install.sh
T
Wez Furlong 278bc81aa0 move shaping -> policy-extras/shaping, and deploy with package
The assets/policy-extras dir is now deployed to
`/opt/kumomta/share/policy-extras` and added to the require path,
so you can do:

```lua
local shaping = require 'policy-extras.shaping'
```

to pull it into your policy.
2023-04-26 14:51:52 -07:00

22 lines
933 B
Bash
Executable File

#!/bin/bash
set -ex
PREFIX="${1:-/opt/kumomta}"
mkdir -p ${PREFIX}/sbin ${PREFIX}/share/bounce_classifier ${PREFIX}/share/policy-extras
install -Dsm755 target/release/kumod -t ${PREFIX}/sbin
install -Dsm755 target/release/traffic-gen -t ${PREFIX}/sbin
install -Dsm755 target/release/tailer -t ${PREFIX}/sbin
install -Dm644 assets/bounce_classifier/* -t ${PREFIX}/share/bounce_classifier
install -Dm644 assets/init.lua -T ${PREFIX}/share/minimal-init.lua
install -Dm644 assets/policy-extras/*.lua -t ${PREFIX}/share/policy-extras
if test "$EUID" -eq 0 && getent passwd kumod >/dev/null && getent group kumod >/dev/null ; then
for dir in /opt/kumomta/etc /opt/kumomta/etc/policy ; do
[ -d "$dir" ] || install -d --mode 755 --owner kumod --group kumod $dir
done
for dir in /var/spool/kumomta /var/log/kumomta /opt/kumomta/etc/dkim ; do
[ -d "$dir" ] || install -d --mode 2770 --owner kumod --group kumod $dir
done
fi