- Build the application.
go build -o FprintLog
- Move compiled binary to local user folder and ensure it's executable.
mkdir -p ~/.local/bin && cp FprintLog ~/.local/bin && chmod +x ~/.local/bin/FprintLog
- Create user service to run FprintLog.
mkdir -p ~/.config/systemd/user
cat << 'EOF' > ~/.config/systemd/user/FprintLog.service
[Unit]
Description=keeping a log of failed and successful fingerprint events
After=graphical-session.target
[Service]
ExecStart=%h/.local/bin/FprintLog
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
EOF- Start the service.
systemctl --user daemon-reload && systemctl --user enable --now FprintLog.service
- Check it's running.
Status: systemctl --user status FprintLog.service
Live Log: journalctl --user -u FprintLog.service -f
this will also log failed authentications outside of login (e.g fprint being used for sudo)