Create-targets-tasks: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „<syntaxhighlight> #!/bin/bash while read LINE do NAME=$(echo $LINE | cut -f 1 -d :) IP=$(echo $LINE | cut -f 2 -d :) XML="<create_target> <name>$NAME-target</n…“) |
|||
Zeile 1: | Zeile 1: | ||
+ | =config= | ||
+ | xinux-belana.txmn.de:87.182.24.65 | ||
+ | xinux-nagus.txmn.de:124.142.2.5 | ||
+ | =script= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
#!/bin/bash | #!/bin/bash |
Aktuelle Version vom 17. Januar 2020, 11:08 Uhr
config
xinux-belana.txmn.de:87.182.24.65 xinux-nagus.txmn.de:124.142.2.5
script
#!/bin/bash
while read LINE
do
NAME=$(echo $LINE | cut -f 1 -d :)
IP=$(echo $LINE | cut -f 2 -d :)
XML="<create_target> <name>$NAME-target</name> <hosts>$IP</hosts> <port_list id=\"33d0cd82-57c6-11e1-8ed1-406186ea4fc5\"/> </create_target>"
ID=$(echo $XML | omp -X - | cut -f 2 -d '"')
omp -C --name=$NAME-task -c daba56c8-73ec-11df-a475-002264764cea --target=$ID
done < $1