dotfiles/.local/bin/scripts/netkeeper

13 lines
423 B
Plaintext
Raw Normal View History

2022-05-19 09:42:01 +00:00
#!/bin/sh -e
# Keeps the Internet at bay
2022-09-03 18:07:05 +00:00
if test -e "$JOURNAL"; then
echo "What do you want to do? Check your journal!"
while test $(echo "$intention" | wc -c) -lt 10
do read intention
done
jrnl intentions "$intention"
sudo nft flush chain inet filter outall
2022-09-08 23:42:02 +00:00
sudo nft add rule inet filter outall meta hour "$(date +%H:%M)"-"$(date +%H:%M --date="${1:-5}min")" accept
2022-09-03 18:07:05 +00:00
#expr \( "$1" \> 40 \) \* 10 \| "$1"
fi