-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-on-all
More file actions
executable file
·34 lines (31 loc) · 846 Bytes
/
install-on-all
File metadata and controls
executable file
·34 lines (31 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# installs software on all machines
usage () { echo "$0 usage: " && grep " .)\ #" $0; exit 0; }
while getopts "a:c:h" arg; do
case $arg in
a) # possible action: install|remove
echo "action: ${OPTARG}"
ACTION="install"
;;
c) # name of package
echo "command: ${OPTARG}"
PACKAGE="${OPTARG}"
;;
h | *)
usage
exit 0
;;
esac
done
for node in europa.local io.local ganymede.local callisto.local titan.local phobos.local pi@pi-hole.local
do
echo '************************************'
echo " $node"
echo '************************************'
echo connecting ...
ssh $node "uname -a ; sudo apt-get -y ${ACTION} ${PACKAGE}"
echo '************************************'
echo " $node done"
echo '************************************'
done