post_install() { . /etc/unattended-arch-upgrade.conf useradd $UPDATEUSER -G systemd-journal -m # no account expiry, never set to inactive, no password expiry chage -E -1 -I -1 -m -1 -M -1 $UPDATEUSER systemctl enable unattended-arch-upgrade.timer systemctl start unattended-arch-upgrade.timer systemctl list-timers unattended-arch-upgrade.timer systemctl daemon-reload sed -i '/\[options\]/a Include=/etc/unattended-arch-upgrade.ignore' $PACCONF mkdir -p $LOGDIR chown $UPDATEUSER $LOGDIR chmod 644 /etc/cron.d/archnews } post_upgrade(){ systemctl daemon-reload } pre_remove() { . /etc/unattended-arch-upgrade.conf sed -i 's#Include=/etc/unattended-arch-upgrade.ignore##g' $PACCONF systemctl stop unattended-arch-upgrade.timer systemctl disable unattended-arch-upgrade.timer userdel $UPDATEUSER -r }