Fix unattended_upgrade not starting

This commit is contained in:
yalh76 2022-09-08 01:00:17 +02:00
parent 87022f9894
commit c5cefc05d3

View file

@ -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"