From 7bdc116352f967350c5b182c631912007558dc36 Mon Sep 17 00:00:00 2001 From: Stefanie Eckner Date: Sat, 30 Dec 2023 14:12:13 +0100 Subject: upload key(s) --- computer-time-limit | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)) -- cgit v1.2.3-70-g09d2