|
@@ -17,6 +17,8 @@
|
17
|
17
|
|
18
|
18
|
|
19
|
19
|
# Host list path (file should contains hosts seperated by $IFS )
|
|
20
|
+# You can specify multiple tags [a-z0-9] for each host, so you can filter easier
|
|
21
|
+# which hosts to work on
|
20
|
22
|
hosts="$HOME/.config/mhssh.hosts"
|
21
|
23
|
|
22
|
24
|
red=$(tput setaf 1)
|
|
@@ -28,8 +30,11 @@ dtch=''
|
28
|
30
|
|
29
|
31
|
usage() {
|
30
|
32
|
echo "Run a single command on multiple hosts"
|
31
|
|
- echo "Usage : $0 [-h|--help] [-n|--no-color] [-B|--background] [-D|--detach] CMD ..."
|
32
|
|
- echo -e "\n\t-h --help\tprint this help\n\t-n --no-color\tdisable colors\n\t-B --background\tput the task in background\n\t-D --detach\tuse dtach to put the task in background\n\n"
|
|
33
|
+ echo "Usage : $0 [-h|--help] [-n|--no-color] [-B|--background] [-D|--detach]
|
|
34
|
+ [-t|--tags tags] CMD ..."
|
|
35
|
+ echo -e "\n\t-h --help\tprint this help\n\t-n --no-color\tdisable
|
|
36
|
+ colors\n\t-B --background\tput the task in background\n\t-D --detach\tuse
|
|
37
|
+ dtach to put the task in background\n\t-t --tags tags\n\n"
|
33
|
38
|
echo "Host list configured to be found in '$hosts'"
|
34
|
39
|
}
|
35
|
40
|
|