init web ems all
This commit is contained in:
40
wxc2_omc/element/overview/bsscommRestart
Executable file
40
wxc2_omc/element/overview/bsscommRestart
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
tmptty=`tty`
|
||||
tmptty=`basename $tmptty`
|
||||
tmpname=`whoami`
|
||||
ip="localhost"
|
||||
inp1="ems
|
||||
"
|
||||
inp2="Ems123!
|
||||
"
|
||||
|
||||
inputfile="inabc"
|
||||
outputfile="out.log"
|
||||
|
||||
rm -fr $inputfile
|
||||
rm -fr $outputfile
|
||||
mknod $inputfile p
|
||||
touch $outputfile
|
||||
|
||||
exec 7<>$outputfile
|
||||
exec 8<>$inputfile
|
||||
|
||||
telnet $ip <&8 >&7 &
|
||||
sleep 2; echo $inp1 >>$inputfile
|
||||
sleep 2; echo $inp2 >>$inputfile
|
||||
|
||||
#tail -f $outputfile &
|
||||
|
||||
sleep 3; echo "su -" >>$inputfile
|
||||
sleep 2; echo "rootaa" >>$inputfile
|
||||
sleep 2; echo "kill -9 `pidof bsscomm`" >>$inputfile
|
||||
sleep 2; echo "kill -9 `pidof alive`" >>$inputfile
|
||||
sleep 2; echo "/usr/local/omc/bin/bsscomm &" >>$inputfile
|
||||
sleep 2; echo "/usr/local/omc/bin/alive &" >>$inputfile
|
||||
sleep 2; echo "exit" >>$inputfile
|
||||
sleep 2; echo "exit" >>$inputfile
|
||||
|
||||
rm -fr $inputfile
|
||||
rm -fr $outputfile
|
||||
|
||||
Reference in New Issue
Block a user