From 52d345fd994313be51622ff9804e9b73f7d9332f Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 20 May 2021 12:15:04 +0200 Subject: [PATCH] bin: add grepman --- .local/bin/scripts/grepman | 2 ++ .local/bin/scripts/walli | 3 +++ 2 files changed, 5 insertions(+) create mode 100755 .local/bin/scripts/grepman diff --git a/.local/bin/scripts/grepman b/.local/bin/scripts/grepman new file mode 100755 index 0000000..1fee258 --- /dev/null +++ b/.local/bin/scripts/grepman @@ -0,0 +1,2 @@ +#!/bin/sh +find /usr/share/man -name "*$1*" | xargs gunzip -c | grep $2 --color=auto diff --git a/.local/bin/scripts/walli b/.local/bin/scripts/walli index 01dc213..1db88be 100755 --- a/.local/bin/scripts/walli +++ b/.local/bin/scripts/walli @@ -11,6 +11,9 @@ iptables -A chain-times -m owner --uid-owner janek -d 127.0.0.0/8 -j ACCEPT time9=$(date -u -d "$(date -d 09:00)" +%k) iptables -A chain-times -m owner --uid-owner janek -j DROP -m time \ --timestart $(date -u -d "$(date -d "${1:-15 min}")" +%k:%M) --timestop $(expr $time9 - 2):00 + +# TODO Only 10 minutes every hour, anything else needs justification + # Only allow periodical internet access in the morning #iptables -A chain-times -m owner --uid-owner janek -j DROP -m time --weekdays 1-5 \ # --timestart $time9:20 --timestop $(expr $time9 + 1):00