#!/bin/bash

echo "Select:"
		echo "1) 211.61.51.148"
		echo "2) 172.16.150.148"
		echo "3) 192.168.100.185"
		echo "4) 192.168.150.148"
		
		read number
        case $number in
            1)
			  ipaddress1=211.61.51.148
              ;;
            2)
              ipaddress1=172.16.150.148
              ;;
			3)
              ipaddress1=192.168.100.185
              ;;
			4)
              ipaddress1=192.168.150.148
              ;;
            *)
              echo "Error : Unknown Command"
              ;;
            esac

			echo $ipaddress1


mv /home/wemin/zagent-cen7* /root/zagent
cp /root/zagent /usr/sbin/zagent
chmod 755 /usr/sbin/zagent
/usr/sbin/zagent -install
/usr/sbin/zagent -a admin $ipaddress1
/usr/sbin/zagent -c
/usr/sbin/zagent -start