citadel

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

nostat (413B)


      1 #!/usr/bin/env bash
      2 
      3 ctl () {
      4     printf "%s-ing %s email notifier\n" "$1" "$2" >&2
      5 }
      6 
      7 for var in "$@"
      8 do
      9     case $var in
     10         +h)
     11             ctl start email-fetcher
     12             touch ~/var/notify/home
     13             ;;
     14         -h)
     15             ctl stop email-fetcher
     16             rm -f ~/var/notify/home
     17             ;;
     18      esac
     19 done
     20 
     21 res=off
     22 if [ -f ~/var/notify/home ]
     23 then
     24     res=on
     25 fi
     26 
     27 printf '%s\n' "$res"