1 #install_giis.sh - Simple script the installs giis binary. 2 clear 3 #Installation - 0 for interactive - 1 use config file 4 if [ $# -eq 1 ] 5 then 6 echo -e $"\n\t\t\tInstalling giis binary - giis-4.6.1" 7 else 8 echo "Wrong Usage" 9 echo "Interactive installation : Usage: sh install_giis.sh 0" 10 echo "Config.file installation : Usage: sh install_giis.sh 1" 11 exit 12 fi 13 14 15 cp ./bin/giis /usr/bin 16 17 if [ $? -eq 0 ] 18 then 19 echo "copied to bin" 20 else 21 echo "Unable to move binary" 22 exit 23 fi 24 25 #wvar=`grep -c giis /etc/inittab` 26 27 #if [ $wvar -eq 0 ] 28 #then 29 #/bin/cat ./config/giis.config.in >> /etc/inittab ; 30 #echo "config Done"; 31 #else 32 #echo "config Found"; 33 #fi 34 35 wvar=`grep -c giis /etc/crontab` ; 36 if [ $wvar -eq 0 ] 37 then 38 /bin/cat ./config/giis.daemon >> /etc/crontab ; 39 echo "cron Done"; 40 else 41 echo "cron Found"; 42 fi 43 44 if [ $1 -eq 0 ] 45 then 46 cp config/giis.conf /etc 47 giis -i 48 fi 49 50 if [ $1 -eq 1 ] 51 then 52 cp config/giis.conf /etc 53 giis -c 54 fi 55 56 cp config/hai /giis/hai 57 cp config/quotes /giis/quotes 58 59 echo "Done" 60