diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-09 02:55:46 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-09 02:55:46 +0100 |
commit | f189d88af4e56eeaedffa072a22e565b73093013 (patch) | |
tree | f3bceda7795c6419921afd5e6f478d9e30c39e6b | |
parent | 24e355cfe42c34c9132d27e01c4a3fc480461171 (diff) | |
download | ap01-f189d88af4e56eeaedffa072a22e565b73093013.tar ap01-f189d88af4e56eeaedffa072a22e565b73093013.tar.gz ap01-f189d88af4e56eeaedffa072a22e565b73093013.tar.bz2 ap01-f189d88af4e56eeaedffa072a22e565b73093013.tar.xz ap01-f189d88af4e56eeaedffa072a22e565b73093013.zip |
...
-rw-r--r-- | files/files/etc/config/dayled.sops | 6 | ||||
-rw-r--r-- | files/files/usr/local/sbin/dayled.sh | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/files/files/etc/config/dayled.sops b/files/files/etc/config/dayled.sops index ad89426..fa8e853 100644 --- a/files/files/etc/config/dayled.sops +++ b/files/files/etc/config/dayled.sops | |||
@@ -1,13 +1,13 @@ | |||
1 | { | 1 | { |
2 | "data": "ENC[AES256_GCM,data:hOZtsaVLwayRsA1vSdN0Rp6V6shQe0sQp1mGnKiwhR3SsSitYmGohzt+sfXER4YKRaMjE1QwdeSFcX3kjthvgHiOqscirKBdodTxYQvwrr8iog1FgmWCLlNAy4ymu4w=,iv:boQ8RbTFCUPAmzr6dW/q2mg6/Hj8Z3oN9y79gdSMLvQ=,tag:f/suZzHXTpS7RWVQQw1D/g==,type:str]", | 2 | "data": "ENC[AES256_GCM,data:QcdL23Ja9zy6v9VC8bQS5AoMrY1J++ricJMRP64q6AKa8Ve9TWUzq/UEpOwh3BEgk6jD6CVTF64QjQiySjekqKXeteEb+lDJUGRjr0qpXQXhcyu00+6OG+uvafRQha5npRlsC60dieJpcPIhFVrq3Udouq8l1Kqb4Q==,iv:JXmVIG5wF6WzirvMAJVVkQ9GRzxRmJzCm09jIGr9NNM=,tag:2Nq9nsiMflCp4ZPrB2l2uQ==,type:str]", |
3 | "sops": { | 3 | "sops": { |
4 | "kms": null, | 4 | "kms": null, |
5 | "gcp_kms": null, | 5 | "gcp_kms": null, |
6 | "azure_kv": null, | 6 | "azure_kv": null, |
7 | "hc_vault": null, | 7 | "hc_vault": null, |
8 | "age": null, | 8 | "age": null, |
9 | "lastmodified": "2022-01-09T01:15:26Z", | 9 | "lastmodified": "2022-01-09T01:55:01Z", |
10 | "mac": "ENC[AES256_GCM,data:hwXoKGTfNQAydB1dW5z8OOIngWPtgpuoNA/cUE7Fp7pk0qfepkasAI3Ia5pbnTelwEdEA8WIUkspsWMTsHSsSfGCaK1nlUoJaFEPp2WfAlYMlv72hpYSPCMliEqzZlVEKErHEntzmKEKkzIEZgvRdcXlKkuaoVqw4BLOq7D7GMY=,iv:oUhIWjYBRp+IG/CGQ0Di53O9p1IThTUZZFtOnyrC210=,tag:6URfy7eJE7UyfLfo5cw6Ng==,type:str]", | 10 | "mac": "ENC[AES256_GCM,data:XpCj6sjUD7MH+ehB6KY/yWx86chE5i4bdo0ux2xvDyxTSMfy2XPQSgSAcwkiqZqFK+VhTgIhire0KfKtZO+kR2VH2mabBVOqkFfafkiORwTPuoIKm+jkQA+6ETbyVT1Pprrm8eEKPOloX2YIiZ3fyFUP7vgaFRgO2FA8Fs4l3ok=,iv:La8hXG7N5gQJpzKKPQxlwNtr96sJHQLyW6VxgInoOTY=,tag:myzDq4pWEKjKIEA9JrDYiA==,type:str]", |
11 | "pgp": [ | 11 | "pgp": [ |
12 | { | 12 | { |
13 | "created_at": "2022-01-09T01:06:05Z", | 13 | "created_at": "2022-01-09T01:06:05Z", |
diff --git a/files/files/usr/local/sbin/dayled.sh b/files/files/usr/local/sbin/dayled.sh index 8a30b4e..07f9dc8 100644 --- a/files/files/usr/local/sbin/dayled.sh +++ b/files/files/usr/local/sbin/dayled.sh | |||
@@ -3,9 +3,10 @@ | |||
3 | local latitude="$(uci get dayled.@dayled[0].latitude)" | 3 | local latitude="$(uci get dayled.@dayled[0].latitude)" |
4 | local longitude="$(uci get dayled.@dayled[0].longitude)" | 4 | local longitude="$(uci get dayled.@dayled[0].longitude)" |
5 | local offset="$(uci get dayled.@dayled[0].offset)" | 5 | local offset="$(uci get dayled.@dayled[0].offset)" |
6 | local twilight="$(uci get dayled.@dayled[0].twilight)" | ||
6 | 7 | ||
7 | function act() { | 8 | function act() { |
8 | sunwait $1 $offset $latitude $longitude >/dev/null | 9 | sunwait $1 $twilight $offset $latitude $longitude >/dev/null |
9 | local state=$? | 10 | local state=$? |
10 | if [ "$state" -eq 2 ]; then | 11 | if [ "$state" -eq 2 ]; then |
11 | cat /sys/class/leds/blue\:dome/max_brightness > /sys/class/leds/blue\:dome/brightness | 12 | cat /sys/class/leds/blue\:dome/max_brightness > /sys/class/leds/blue\:dome/brightness |