mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
15 lines
524 B
Bash
15 lines
524 B
Bash
#!/bin/bash -e
|
|
|
|
# Put snapd auto refresh on hold
|
|
# as it may generate too much traffic on Canonical's snap server
|
|
# 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)"
|