From 5f4aec63a26308bb344662b9cca3b81be3127fb5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 16 Jun 2019 07:28:35 +0200 Subject: update-all: use screen iff $DISPLAY is empty --- update-all.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update-all.in b/update-all.in index a776498..73a3ab1 100644 --- a/update-all.in +++ b/update-all.in @@ -14,5 +14,9 @@ do cmd="ssh -t -t ${system}" fi cmd="${cmd} update-me" - urxvt -title "${system}: update-me" -e ${cmd} & + if [ -z "${DISPLAY}" ]; then + screen -S "update-all.${system// /.}" -d -m ${cmd} + else + urxvt -title "${system}: update-me" -e ${cmd} & + fi done -- cgit v1.2.3-54-g00ecf