]> git.friedersdorff.com Git - max/dotfiles.git/commitdiff
Do not start mutt if password could not be retrieved
authorMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 13 Sep 2018 13:28:23 +0000 (14:28 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 13 Sep 2018 13:28:23 +0000 (14:28 +0100)
aber_offline_mail/.local/bin/aber_mutt

index 4c5045983b409a36a76899bbbf4669f3529c8b32..0d5ca2624fcacc90d0b0eeee2cdc4964708b9e32 100755 (executable)
@@ -40,6 +40,11 @@ touch $PASS_FILE
 chown max:max $PASS_FILE
 chmod 600 $PASS_FILE
 pass Aber/Main | head -n 1 > $PASS_FILE
+if [[ "${PIPESTATUS[0]}" -ne 0 ]]; then
+  echo "Password not available"
+  exit
+fi
+
 
 sync_mailboxes_loop& >> $LOG 2>&1
 echo $! > $PID