From: Maximilian Friedersdorff Date: Thu, 13 Sep 2018 13:28:23 +0000 (+0100) Subject: Do not start mutt if password could not be retrieved X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=4a3f6374f30cb4e5dc112dc4581b86b9922c6fcb;p=max%2Fdotfiles.git Do not start mutt if password could not be retrieved --- diff --git a/aber_offline_mail/.local/bin/aber_mutt b/aber_offline_mail/.local/bin/aber_mutt index 4c50459..0d5ca26 100755 --- a/aber_offline_mail/.local/bin/aber_mutt +++ b/aber_offline_mail/.local/bin/aber_mutt @@ -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