summaryrefslogtreecommitdiff
path: root/update-all.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-16 07:28:35 +0200
committerErich Eckner <git@eckner.net>2019-06-16 07:28:35 +0200
commit5f4aec63a26308bb344662b9cca3b81be3127fb5 (patch)
tree36611529600a6c9df9278da537baeddbc9d7b5f8 /update-all.in
parent562a576992ebc631af879f3f7e3240b769af546d (diff)
downloadupdate-all-5f4aec63a26308bb344662b9cca3b81be3127fb5.tar.xz
update-all: use screen iff $DISPLAY is empty
Diffstat (limited to 'update-all.in')
-rw-r--r--update-all.in6
1 files changed, 5 insertions, 1 deletions
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