summaryrefslogtreecommitdiff
path: root/update-all.in
blob: 73a3ab1ebc1c2aa5026ce5ce1ed48c2052a87c62 (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.${system// /.}" -d -m ${cmd}
  else
    urxvt -title "${system}: update-me" -e ${cmd} &
  fi
done