#!/bin/bash cd "$(dirname "$(readlink -e "$0")")" if ! cnt=$( npx playwright test ); then { printf '%s\n' \ 'To: erich@eckner.net' \ 'From: erich@'"$(hostname)" \ 'Subject: playwright' \ '' \ 'Die Milchtankstelle geht wieder:' \ '' \ "${cnt}" } \ | sendmailadvanced -t fi