[Ubuntu] restart snapd during images generation (#4814)

This commit is contained in:
Mikhail Koliada
2021-12-29 13:01:38 +03:00
committed by GitHub
parent 92eeb55189
commit 29dbc46881

View File

@@ -5,4 +5,10 @@
# when they are rolling a new major update out. # when they are rolling a new major update out.
# Hold is calculated as today's date + 60 days # Hold is calculated as today's date + 60 days
# snapd is started automatically, but during image generation
# a unix socket may die, restart snapd.service (and therefore snapd.socket)
# to make sure the socket is alive.
systemctl restart snapd.socket
systemctl restart snapd
snap set system refresh.hold="$(date --date='today+60 days' +%Y-%m-%dT%H:%M:%S%:z)" snap set system refresh.hold="$(date --date='today+60 days' +%Y-%m-%dT%H:%M:%S%:z)"