citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

recvalert (312B)


      1 #!/usr/bin/env bash
      2 
      3 set -e
      4 
      5 PAYLOAD=$(gpg --decrypt)
      6 
      7 # relay to laptop
      8 if [ $(hostname) == "monad" ]; then
      9   printf "sending to laptop\n"
     10   tmp=$(mktemp)
     11   <<<"$PAYLOAD" gpg --encrypt -r quiver > "$tmp"
     12   <"$tmp" nc -uw0 10.100.0.2 55000
     13   rm -f "$tmp"
     14 fi
     15 <<<"$PAYLOAD" xargs -I{} notify-send -u critical "{}"