Addded ExecStop to the i3lock service

This commit is contained in:
Nemo 2017-01-31 19:56:47 +05:30
parent b5f08f8c43
commit 5bf493bbda
1 changed files with 3 additions and 1 deletions

View File

@ -3,8 +3,10 @@ YUBIKEY_SERIAL=`cat /home/nemo/.yubikey-serial.txt`
DEVICE_SERIAL=`ykinfo -s | cut -d ' ' -f 2`
LOGFILE="/home/nemo/logs/auth.log"
export DISPLAY=:0
# We only unlock the device if the key matches
if [[ "$YUBIKEY_SERIAL" -eq "$DEVICE_SERIAL" ]]; then
echo "`date` unlocked using yubkikey" >> $LOGFILE
killall i3lock
/usr/bin/systemctl stop i3lock.service
fi