Paste the following readme:
#myexpect V1.0 Released
#auth [email protected]
#env description
Myexpect server Requires:bash is needed Ofcource
Expect for answer password
VSFTPD for client-to-down load scripts upload files etc.
Myexpect client Requires:ftp for upload
Wget for down load
Python possible if want to run Python scripts
#file and Direcory description
#files in Myexpect server
Tree/server-scripts
/server-scripts: Scripts in Myexpect server
├──exc-py.sh: You can use exec-py.sh [yourscript.py] to run Python scripts on the hosts defined in hosts
├──exc-sh.sh: You can use exec-sh.sh [yourscript.sh] to run bash scripts on the hosts defined in hosts
├──hosts.pass: Host file likes [IP port username password],you ' d better change it before use it
├──mrelease.sh: Run this scripts to the CP files in/var/ftp/pub to the hosts defined in Hosts.pass
└──ssh.exp: This file was used to answer what are asked in shell scripts
tree/var/ftp/pub/: You can put scripts Here,and it'll be run on the hosts defined in Hosts.pass when you run ex C-py or Exc-sh on Myexpect-server
/var/ftp/pub/
├──gatherinformation-2.0.py:p Ython Scripts
├──oscheck.sh: Bash scripts
├──storage_check.sh: Bash scripts
└──uploadreport.sh: Bash scripts
#files in Myexpect Client
tree/client-scripts/
/client-scripts/
├──gatherinformation-2.0.py:p Ython Scripts
├──oscheck.sh: Bash scripts
├──storage_check.sh: Bash scripts
└──uploadreport.sh: Bash scripts
#how to use Myexpect?
1) put Yourscript in/var/ftp/pub
2)/server-scripts/mrelease
3)/server-scripts/exc-sh [yourscript.sh]
This article is from the "Advance Bar Rookie" blog, please make sure to keep this source http://chentp.blog.51cto.com/10638759/1744436
Wrote a batch-managed bash applet that took advantage of the Redhat native Expect,wget package group.