summaryrefslogtreecommitdiff
path: root/update-all.in
blob: 913605874085762fd50c6ec0c4e806393cdea737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# update-all version #VERSION#
# updates all clients defined in #ETCDIR#/update-all.conf via local versions of update-me

. #ETCDIR#/update-all.conf

for system in "${systems[@]}"
do
  if [ "${system}" == "localhost" ]
  then
    cmd=""
  else
    cmd="ssh -t -t ${system}"
  fi
  cmd="${cmd} update-me"
  if [ -z "${DISPLAY}" ]; then
    screen -S update-all -d -m ${cmd}
  else
    urxvt -title "${system}: update-me" -e ${cmd} &
  fi
done