dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

vdirsyncd (623B)


      1 #!/bin/sh
      2 set -e
      3 
      4 notidie() {
      5   notify "$1" "$2" vdirsyncd
      6   exit 1
      7 }
      8 
      9 os=$(uname -s | tr '[:upper:]' '[:lower:]')
     10 case "$os" in
     11   darwin*)
     12     while pgrep RotMG; do sleep 60; done
     13     while pgrep pinentry; do sleep 60; done
     14     /usr/local/bin/alacritty -e /usr/local/bin/rbw unlock
     15     /usr/local/bin/rbw unlocked || notidie "Vdirsyncer: error syncing" "Vault is locked"
     16     ;;
     17 esac
     18 
     19 vdirsyncer sync || notify 'Error in vdirsyncer' 'Did not sync properly, check /tmp/vdirsyncd.std{out,err}' vdirsyncd
     20 vdirsyncer metasync || notify 'Error in vdirsyncer' 'Did not sync properly, check /tmp/vdirsyncd.std{out,err}' vdirsyncd