You will only see the public (readable) repos here until you login.
Browse Source

Get ridd of the hass-term

Joachim M. Giæver 7 months ago
parent
commit
a1056653c8

File diff suppressed because it is too large
+ 1 - 1
README.md


+ 1 - 1
scripts/bin/certs-daemon

@@ -51,7 +51,7 @@ if [ "${DOMAIN}" != "--not-set" ]; then
         if [ "${i}" -ne 0 ]; then
             cp -f "${DOMAIN_DIR}/.time" "${SSL_DIR}/.time"
             logger "${SNAP_NAME}: Certificates (${DOMAIN}) changed for ${SNAP_NAME}-${UUID}, restart"
-            snapctl restart "${SNAP_NAME}.hass"
+            snapctl restart "${SNAP_NAME}"
         fi
         gpg_close_agent
     else

+ 0 - 4
scripts/bin/slot-certs

@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-source "${SNAP}/init"
-
-exec $@

+ 1 - 2
snap/hooks/connect-slot-components

@@ -1,3 +1,2 @@
 #!/usr/bin/env bash
-
-snapctl restart "${SNAP_NAME}.hass"
+snapctl restart "${SNAP_NAME}"

+ 1 - 1
snap/hooks/disconnect-slot-certs

@@ -4,4 +4,4 @@ source "${SNAP}/init"
 logger "Disconnect ${SNAP_NAME}:certs (uuid: ${UUID})"
 
 rm -rf "${SSL_DIR}"
-snapctl restart "${SNAP_NAME}.hass"
+snapctl restart "${SNAP_NAME}"

+ 1 - 0
snap/hooks/unprepare-slot-components

@@ -4,3 +4,4 @@ logger "Disconnect 'custom_components' (HACS) from ${SNAP_NAME}"
 CC="${SNAP_DATA}/custom_components"
 logger "Removing ${CC}"
 rm -rf "${CC}"
+snapctl restart "${SNAP_NAME}"

+ 5 - 5
snap/snapcraft.yaml

@@ -45,10 +45,8 @@ hooks:
       - network-bind
 
 apps:
-  hass:
+  home-assistant-snap:
     command: bin/hass --config $SNAP_DATA
-    command-chain:
-      - bin/slot-certs
     daemon: simple
     environment:
       PIP_USER: 1
@@ -62,7 +60,9 @@ apps:
       - physical-memory-control
     slots: 
       - components
-  certs-daemon:
+  check-config:
+    command: bin/hass --script check_config
+  renew-cert:
     command: bin/certs-daemon
     daemon: oneshot
     restart-condition: always
@@ -72,7 +72,7 @@ apps:
     plugs:
       - network
       - network-bind
-  refresh-certs:
+  force-renew-cert:
     command: bin/certs-daemon
     slots:
       - certs