make deb builds dist/jarl_<version>_<arch>.deb with dpkg-deb alone (no root), for the host or another architecture (DEB_ARCH=arm64). The package creates the jarl user and directories and an example jarl.yaml on the first install, restarts a running jarld on upgrades, never touches /etc/jarl/jarl.yaml, stops jarld on removal, and keeps Jarl's data even on purge. make install and the package install bash completion for jarl and jarld. Besides commands and flags it completes server and group names from the CLI configuration, zone, view, ACL, TSIG key and user names from the server, and record types. make dist includes the completion scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
612 B
Bash
Executable File
22 lines
612 B
Bash
Executable File
#!/bin/sh
|
|
# Jarl: runs after the package's files are removed.
|
|
set -e
|
|
|
|
case "$1" in
|
|
remove|purge)
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl daemon-reload || true
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
# Even a purge keeps Jarl's data: the database in /var/lib/jarl is the
|
|
# source of your DNS configuration, and named.conf may still include the
|
|
# files in /etc/bind/jarl. Remove them by hand when you no longer need them.
|
|
if [ "$1" = purge ]; then
|
|
echo "jarl: kept /etc/jarl, /var/lib/jarl, /etc/bind/jarl, /var/lib/bind/jarl and"
|
|
echo "/var/cache/bind/jarl (named may still use them); remove them by hand if unused."
|
|
fi
|
|
|
|
exit 0
|