Joachim M. Giæver 4 år sedan
förälder
incheckning
67f52090f2
2 ändrade filer med 12 tillägg och 6 borttagningar
  1. 1 0
      scripts/hooks/prepare-slot-certs
  2. 11 6
      snap/snapcraft.yaml

+ 1 - 0
scripts/hooks/prepare-slot-certs

@@ -40,3 +40,4 @@ snapctl set :certs uuid="${UUID}"
 snapctl set :certs pkey="${KEY}"
 
 logger "${SNAP_NAME}:certs (uuid: ${UUID}) prepared"
+logger "KEY: ${KEY}"

+ 11 - 6
snap/snapcraft.yaml

@@ -34,6 +34,16 @@ slots:
     write:
       - $SNAP_DATA
 
+hooks:
+  install:
+    plugs:
+      - network
+      - network-bind
+  prepare-slot-certs:
+    plugs:
+      - network
+      - network-bind
+
 apps:
   hass:
     command: bin/hass --config $SNAP_DATA
@@ -70,12 +80,6 @@ apps:
       - network
       - network-bind
 
-hooks:
-  prepare-slot-certs:
-    plugs:
-      - network
-      - network-bind
-
 parts:
   homeassistant:
     plugin: python-wot-plugin
@@ -138,6 +142,7 @@ parts:
       - gpg
       - gpg-agent
     organize:
+      install: snap/hooks/install
       configure: snap/hooks/configure
       post-refresh: snap/hooks/post-refresh
       prepare-slot-certs: snap/hooks/prepare-slot-certs