mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
Wait for the apt.daily service to finish instead of killing it avoiding bad state (#45)
This commit is contained in:
+1
-3
@@ -8,9 +8,7 @@ before_install:
|
||||
# Fix for Ubuntu Xenial apt-daily.service triggering
|
||||
# https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image
|
||||
- |
|
||||
sudo systemctl stop apt-daily.service &&
|
||||
sudo systemctl kill --kill-who=all apt-daily.service &&
|
||||
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead) ; do
|
||||
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
done
|
||||
- sudo apt-get -qq update
|
||||
|
||||
Reference in New Issue
Block a user