mirror of https://github.com/captn3m0/Scripts.git
[auth] Improves yubikey handling
This commit is contained in:
parent
50a776ff77
commit
ea4dfa09ce
|
@ -4,7 +4,7 @@ DEVICE_SERIAL=`ykinfo -s | cut -d ' ' -f 2`
|
|||
LOGFILE="/home/nemo/logs/auth.log"
|
||||
|
||||
# We only unlock the device if the key matches
|
||||
if [[ "$YUBIKEY_SERIAL"="$DEVICE_SERIAL" ]]; then
|
||||
if [[ "$YUBIKEY_SERIAL" -eq "$DEVICE_SERIAL" ]]; then
|
||||
echo "`date` unlocked using yubkikey" >> $LOGFILE
|
||||
killall i3lock
|
||||
fi
|
|
@ -1,3 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
/bin/su nemo -c "DISPLAY=:0 xautolock -locknow"
|
||||
LOGFILE="/home/nemo/logs/auth.log"
|
||||
|
||||
/bin/su nemo -c "DISPLAY=:0 /home/nemo/projects/scripts/i3lock.sh" >> $LOGFILE
|
||||
echo "`date` locked using Yubikey $?" >> $LOGFILE
|
Loading…
Reference in New Issue