From fb296b99f2313593d3aa3660f1ff44d59f057d10 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 11 Dec 2023 19:35:09 +0100 Subject: run-test.sh: run from different user which has a keyless signing key --- run-test.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/run-test.sh b/run-test.sh index 2bea55b..7d4ed0d 100755 --- a/run-test.sh +++ b/run-test.sh @@ -2,18 +2,14 @@ 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}" - } \ +if ! cnt=$(su erich -c "npx playwright test"); then + printf '%s\n' \ + 'To: erich@eckner.net' \ + 'From: erich@'"$(hostname)" \ + 'Subject: playwright' \ + '' \ + 'Die Milchtankstelle geht wieder:' \ + '' \ + "${cnt}" \ | sendmailadvanced -t fi -- cgit v1.2.3-70-g09d2