commit 43830e2e6ff3a771c8117fe940781dd81b6e6e87 parent 055ac4ef52bd1b81aee70bad06be0397dc9e9bc0 Author: Alex Balgavy <alex@balgavy.eu> Date: Mon, 26 Jul 2021 09:40:48 +0200 vdirsyncd: sync using vdirsyncer Also change newsrefreshd to wait while a pinentry is running. Diffstat:
M | scripts/newsrefreshd | | | 1 | + |
A | scripts/vdirsyncd | | | 19 | +++++++++++++++++++ |
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/scripts/newsrefreshd b/scripts/newsrefreshd @@ -10,6 +10,7 @@ os=$(uname -s | tr '[:upper:]' '[:lower:]') case "$os" in darwin*) while pgrep RotMG; do sleep 60; done + while pgrep pinentry; do sleep 60; done /usr/local/bin/alacritty -e /Users/alex/.local/share/cargo/bin/rbw unlock /Users/alex/.local/share/cargo/bin/rbw unlocked || notidie "Newsboat: error reloading" "Vault is locked" ;; diff --git a/scripts/vdirsyncd b/scripts/vdirsyncd @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +notidie() { + notify "$1" "$2" vdirsyncd + exit 1 +} + +os=$(uname -s | tr '[:upper:]' '[:lower:]') +case "$os" in + darwin*) + while pgrep RotMG; do sleep 60; done + while pgrep pinentry; do sleep 60; done + /usr/local/bin/alacritty -e /Users/alex/.local/share/cargo/bin/rbw unlock + /Users/alex/.local/share/cargo/bin/rbw unlocked || notidie "Vdirsyncer: error syncing" "Vault is locked" + ;; +esac + +vdirsyncer sync || notify 'Error in vdirsyncer' 'Did not sync properly, check /tmp/vdirsyncd.std{out,err}' vdirsyncd