init web ems all
This commit is contained in:
30
wxc2_omc/security/backupRestore/bssReboot
Executable file
30
wxc2_omc/security/backupRestore/bssReboot
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
tmptty=`tty`
|
||||
tmptty=`basename $tmptty`
|
||||
tmpname=`whoami`
|
||||
ip="$1"
|
||||
|
||||
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 &
|
||||
|
||||
#tail -f $outputfile &
|
||||
|
||||
sleep 2; echo "reboot" >>$inputfile
|
||||
sleep 2; echo "logout" >>$inputfile
|
||||
|
||||
rm -fr $inputfile
|
||||
rm -fr $outputfile
|
||||
|
||||
#ps -ef | grep telnet | grep -v grep | grep -v telnetd | grep $tmptty | grep $tmpname | awk '{print " kill -9", }' | sh
|
||||
#ps -ef | grep tail | grep -v grep | grep -v telnetd | grep $tmptty | grep $tmpname | awk '{print " kill -9", }' | sh
|
||||
Reference in New Issue
Block a user