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