do not lock on start if just booted (less than 2 minutes ago)
This commit is contained in:
parent
725454828c
commit
fcaf355723
|
@ -3,8 +3,16 @@ screenshot_f="/tmp/.lock.screenshot.png";
|
|||
unlock_f="`mktemp --suffix=.xlock`";
|
||||
log_b="0";
|
||||
|
||||
|
||||
# lock by default
|
||||
rm "$unlock_f";
|
||||
|
||||
# automatic unlock if booted less than 2mins ago
|
||||
onboot=`echo "$(cat /proc/uptime | awk '{print $1}') > 1000;" | bc`;
|
||||
if [ "$onboot" -gt 0 ]; then
|
||||
touch "$unlock_f";
|
||||
fi;
|
||||
|
||||
while true; do
|
||||
|
||||
# if lock file -> wait until it is deleted
|
||||
|
|
Loading…
Reference in New Issue