summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcomputer-time-limit17
1 files changed, 15 insertions, 2 deletions
diff --git a/computer-time-limit b/computer-time-limit
index a3a05cb..00d4c86 100755
--- a/computer-time-limit
+++ b/computer-time-limit
@@ -40,8 +40,21 @@ wie_lange_noch() {
ab=$(date +%s)
return
fi
+ home=$(getent passwd "$1" | cut -d: -f6)
+ if [ -d "${home}" ]; then
+ cd "${home}"
+ if [ -f '.shared_secret' ] \
+ && [ -f '/usr/src/skripte/ykverify/verify.py' ] \
+ && ! '/usr/src/skripte/ykverify/verify.py'; then
+ noch=0
+ ab=$(date +%s)
+ cd -
+ return
+ fi
+ cd -
+ fi
erg=$(
- sende_msg start "$1"
+ sende_msg start "$2"
)
if [ -n "${erg}" ] && ! echo "${erg}" | grep -qvx '[0-9]\+'; then
noch="${erg}"
@@ -119,7 +132,7 @@ while true; do
for user in "${!keys[@]}"; do
key="${keys["${user}"]}"
if is_logged_in "${user}"; then
- wie_lange_noch "${key}"
+ wie_lange_noch "${user}" "${key}"
check_time "${user}" "${key}"
else
sende_msg stop "${key}" >/dev/null