3 # Can be used to lock up a terminal screen until the user enters the correct
4 # password. Pretty sturdy. Store your password in the file "PASSWORDFILE",
7 # Thanks to Kevin Wika for this shell.
9 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
18 PASSWORDFILE=$TMP/lockup_password_file
19 LOGFILE=$TMP/session-lockup.log
21 if [ ! -f "$PASSWORDFILE" ]; then
23 echo "no password file is configured. please put your unlock password in:"
29 read password <$PASSWORDFILE
31 echo "$(date_stringer): +++ terminal locked" >>$LOGFILE
36 while [[ $attempt != $password ]]; do
37 if [ ! -z "$attempt" ]; then
38 echo "$(date_stringer): login attempt with wrong password at $(date)" >>$LOGFILE
42 echo -ne "\npassword: "
47 echo "$(date_stringer): successful login" >>$LOGFILE
48 echo "$(date_stringer): --- terminal unlocked" >>$LOGFILE
51 echo "hi $USER, your password has been accepted. enjoy your computer."