Configure sifyconnect on linux- Auto Connectivity

Following steps will give you sify client on linux, working with an automatic connectivity, you need to be root.

  1. Create a directory where we will be keeping sifyconnect related files or scripts.
    mkdir /usr/src/sify
  2. Change directory
    cd /usr/src/sify
  3. Download sifyclient from
  4. unzip downloaded sify client.
  5. I modified the provided script just as for my needs, there may be some other method. Just added ‘cd /usr/src/sify’ line as first line to

    cd /usr/src/sify
    java -jar supersify.jar $*
    if [ $? -eq 1 ]
    then read

  6. Created a second script to login without providing password every time#!/bin/bash
    #Change USERNAME, PASSWORD and ETH according to your system and user/pass
    #Change ETH with the ethernet card connecting to sify ISP
    #mail me:
    #Get the mac address here
    MAC_SIFY=`ifconfig  $ETH |grep HWaddr|cut -d ” ” -f 11`
    if [ "$#" -ne 1 ];then
    echo “To connect: `basename $0` -c ”
    echo “To disconnect: `basename $0` -d ”
    #Change directory where we unzipped the
    cd /usr/src/sify

    #To connect sify
    if [ "$1" = "-c" ];then
    /bin/sh -u “$USERNAME” -p “$PASSWORD” -m $MAC_SIFY
    #To disconnect sify
    else if [ "$1" = "-d" ];then
    echo “Logging out from sify”
    /bin/sh -l
    echo “To connect: `basename $0` -c ”
    echo “To disconnect: `basename $0` -d ”

  7. chmod the script
    chmod 700 /usr/bin/sifyconnect
  8. To check the internet connectivity create one more script, f.e. /usr/bin/sifychk#!/bin/bash
    #to check the internet connection

    ping -c 4

    if [ "$?" -ne 0 ];then
    /usr/bin/sifyconnect -c

  9. chmod 755 /usr/bin/sifychk
  10. Add an entry in cron to automatically try to connect in case you are disconnected. Following crontab entry will check the internet connectivity every minute and connect automatically in case of disconnection. Obviously network cable and ISP should be reachable.crontab -e
    * * * * * /usr/bin/sifychk >/dev/null 2>&1

That’s it.

Anuj Singh.

About anuj

Don't go for looks; they can deceive. Don't go for wealth; even that fades away. Go for someone who makes you smile because it takes only a smile to make a dark day seem bright.
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>