diff --git a/images/linux/scripts/base/snap.sh b/images/linux/scripts/base/snap.sh index 98163745..6d38c2e0 100644 --- a/images/linux/scripts/base/snap.sh +++ b/images/linux/scripts/base/snap.sh @@ -5,4 +5,10 @@ # when they are rolling a new major update out. # 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)"