[Ubuntu] put snapd auto refresh on hold (#4768)

This commit is contained in:
Mikhail Koliada
2021-12-19 17:19:29 +03:00
committed by GitHub
parent 459c5d1a21
commit d2c5a46fcf
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#!/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
snap set system refresh.hold="$(date --date='today+60 days' +%Y-%m-%dT%H:%M:%S%:z)"

View File

@@ -316,6 +316,11 @@
"script": "{{template_dir}}/scripts/base/apt-mock-remove.sh",
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"script": "{{template_dir}}/scripts/base/snap.sh",
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [

View File

@@ -317,6 +317,11 @@
"script": "{{template_dir}}/scripts/base/apt-mock-remove.sh",
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"script": "{{template_dir}}/scripts/base/snap.sh",
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [