sify autodialer – with expect tools

sify autodialer – with expect tools

1] command to start Sify internet connection automatically

root@indiangnu.org:~# cat /usr/local/bin/sify_autodialer
#!/bin/bash
/usr/bin/sifyconnect -o
/etc/init.d/sifybb stop
sifyd
/etc/sify/sifyautoconnect
/usr/bin/sifyconnect –info

root@indiangnu.org:~#

2] Modify  sify configuration file

root@indiangnu.org:~# head -n 5 /etc/sify/sifyautoconnect

#!/usr/bin/expect -f
#
# This Expect script was generated by autoexpect

# Expect and autoexpect were both written by Don Libes, NIST.
#
…..

….
…..
root@indiangnu.org:~# tail /etc/sify/sifyautoconnect
#
############################
#Add below line at the end of
set timeout -1
spawn /usr/bin/sifyconnect -l
match_max 100000
expect -exact “username :”
send — “myusername\r”
expect -exact “password :”
send — “mypassword\r”
expect eof
############################

root@indiangnu.org:~#

Similar Posts:

Leave a Reply

Your email address will not be published.