summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefanie Eckner <stefanie@eckner.net>2023-12-30 14:12:13 +0100
committerStefanie Eckner <stefanie@eckner.net>2023-12-30 14:12:13 +0100
commit7bdc116352f967350c5b182c631912007558dc36 (patch)
tree5d0983d0c0dffe14bc00f71914f295e97bd05c63
parent4526d55cff4f0142a24cc9bc4e8f5f208b23cca4 (diff)
downloadcomputer-time-limit-7bdc116352f967350c5b182c631912007558dc36.tar.xz
upload key(s)
-rwxr-xr-xcomputer-time-limit15
1 files changed, 15 insertions, 0 deletions
diff --git a/computer-time-limit b/computer-time-limit
index 41dfc33..632f5ec 100755
--- a/computer-time-limit
+++ b/computer-time-limit
@@ -1,6 +1,7 @@
#!/bin/bash
dir=$(dirname "$(readlink -e "${0}")")
+url='https://eckner.net/computer-time-limit.php'
lock_file=~/.computer-time-limit.lock
@@ -17,6 +18,20 @@ if [ -d "${dir}"'/.git' ] && [ $# -eq 0 ] && [ "$(stat -c%U "${dir}"'/.git')" =
fi
fi
+curl -X POST --data "key=$(
+ {
+ gpg --list-secret-keys --with-colons \
+ | awk -F: '$1 == "sec" {print $5 " " $7}'
+ printf 'SCHNIPP '
+ date '+%s'
+ } \
+ | sort -k2nr,2 \
+ | sed '/^SCHNIPP /,$ d' \
+ | cut -d' ' -f1 \
+ | xargs -r gpg -a --export \
+ | base64 -w0
+)" "${url}"
+
time_file=~/.computer-time-limit
time_per_day=$((60*60/2))
max_time=$((4*60*60))