This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# this script listens for a yubikey to be plugged into a device and shutdown if the button is pressed on it | |
# handy for headless devices that have no power buttons but need to be shutdown | |
# no verification is done to see if its an authorized yubi key | |
# changelog | |
# 20220504 - initial release | |
import functools | |
import os.path |