diff --git a/systab b/systab index 394ba9c..2a39c88 100755 --- a/systab +++ b/systab @@ -283,8 +283,11 @@ ExecStopPost=/bin/sh -c 'if [ "\$SERVICE_RESULT" = success ]; then icon=dialog-i EOF fi if [[ -n "$email" ]]; then + local mailer + mailer=$(command -v sendmail || command -v msmtp || true) + [[ -n "$mailer" ]] || { warn "No sendmail or msmtp found, skipping email notification"; return; } cat >> "$file" <