#! bash function post_install { if grep -q "SECRET" /etc/borg/root/env; then echo ">>> Generating passphrase for /etc/borg/root/env" BORG_PASSPHRASE="$(dd if=/dev/urandom of=/dev/stdout bs=1 count=15 2>/dev/null | base64)" sed -i "s|SECRET|$BORG_PASSPHRASE|" "${pkgdir}/etc/borg/root/env" fi if ! systemctl is-enabled backup.timer > /dev/null; then echo ">>> You should run: systemctl enable backup.timer" fi }