From c5cefc05d3348065a428e617989789a97fce638d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 8 Sep 2022 01:00:17 +0200 Subject: [PATCH] Fix unattended_upgrade not starting --- image_builder | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/image_builder b/image_builder index 475a5ae..34389d6 100755 --- a/image_builder +++ b/image_builder @@ -83,18 +83,19 @@ function rebuild_base_lxc() local INSTALL_SCRIPT="https://install.yunohost.org/$DIST" $IN_LXC apt install curl -y + $IN_LXC /bin/bash -c "echo exit 101 > /usr/sbin/policy-rc.d" + $IN_LXC /bin/bash -c "chmod +x /usr/sbin/policy-rc.d" $IN_LXC /bin/bash -c "curl $INSTALL_SCRIPT | bash -s -- -a -d $YNH_BRANCH" - - $IN_LXC systemctl -q stop apt-daily.timer - $IN_LXC systemctl -q stop apt-daily-upgrade.timer - $IN_LXC systemctl -q stop apt-daily.service - $IN_LXC systemctl -q stop apt-daily-upgrade.service + $IN_LXC /bin/bash -c "rm /usr/sbin/policy-rc.d" + $IN_LXC systemctl -q disable apt-daily.timer $IN_LXC systemctl -q disable apt-daily-upgrade.timer $IN_LXC systemctl -q disable apt-daily.service $IN_LXC systemctl -q disable apt-daily-upgrade.service $IN_LXC rm -f /etc/cron.daily/apt-compat $IN_LXC cp /bin/true /usr/lib/apt/apt.systemd.daily + $IN_LXC /bin/bash -c "reboot 0" + sleep 5 # Publish ynh-dev image local LXC_BASE="ynh-dev-$DIST-$ARCH-$YNH_BRANCH-base"