Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Harshpal_Bhati
Employee
Employee

Central Script to run command on multiple gateways

Hi Everyone 

This script can be very useful for enterprise customer where administrator has to perform some common gateway changes on multiple gateways . Like configuring NTP , syslog ,SNMP ,This can also be used to copy a file on multiple gateway in one go . or might be admin needs to know out of 1000 gateways which all gateway is running on  which version .

*********below is the script *************
[Expert@Management:0]# cat rcommand.sh
#!/bin/bash
echo "Do you want to run bash or clish command"
read shell
echo "please input the $shell command to run on all the gateway"
read input
for dest in $(<gateway_ip_list.txt); do
echo "running the $shell command $input on $dest "
cprid_util -server $dest -verbose rexec -rcmd /bin/$shell -c "$input"
done
[Expert@Management:0]#

*************************************************************

For step by step procedure refer the attached document .

Watch a demo here

1 Reply
Sergei_Shir
Employee
Employee

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events