Advertisement
kheeper

bash-while-read

Jan 6th, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.92 KB | None | 0 0
  1. while IFS=: read boxtype version svn_revision device binary configs description changelog
  2. do
  3.     if [[ $device == $detdm ]]
  4.         then
  5.         echo -e "$description"
  6.         echo -e "Stahuji OSCam binarku verze $version ($svn_revision) pro vase zarizeni ..."
  7.         wget http://$SERVER_URL/oscam/oscam-lastest-$boxtype -P /tmp/
  8.         if [ "$(pidof oscam)" ]
  9.             then
  10.             echo -e "Ukoncuji bezici OSCam ..."
  11.             killall oscam
  12.         fi
  13.         if [ $binary ]
  14.             then
  15.             echo -e "Mazu aktualni OSCam ..."
  16.             rm -rf $binary
  17.         fi
  18.         echo -e "Instaluji OSCam ..."
  19.         mv /tmp/oscam-lastest-$boxtype $binary
  20.         chmod 755 $binary
  21.         if [ -f $configs/oscam.conf ]
  22.             then
  23.             echo -n "Prejete si smazat a vytvorit novu konfiguraci? [zadejte: ano/ne]: "
  24.             read configuration_toogle
  25.             if [[ $configuration_toogle == "ano" ]]
  26.                 then
  27.                 rm -rf $configs/oscam.*
  28.                 create_configuration
  29.             fi
  30.         else
  31.             create_configuration
  32.         fi
  33.        
  34.     fi
  35. done < /tmp/oscam.versions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement