summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))