Skip to content

Instantly share code, notes, and snippets.

@alyandon
alyandon / snapd-regain-sanity.patch
Last active January 26, 2023 16:47
Give users control over snapd autorefresh mechanism - apply patch over offiical repo and build binaries
diff --git a/cmd/snapd/main.go b/cmd/snapd/main.go
index 741d998404..55d06d2d9c 100644
--- a/cmd/snapd/main.go
+++ b/cmd/snapd/main.go
@@ -52,6 +52,10 @@ func init() {
}
func main() {
+ if _, found := os.LookupEnv("SNAPD_DISABLE_AUTOREFRESH"); found {
+ logger.Noticef("AutoRefresh disabled due to SNAPD_DISABLE_AUTOREFRESH environment variable being set")