Shell script to change the ip

I am writing a simple DHCP server application that gets ip from a server at boot up ! i wrote a shell script to run the java program that obtains ip from server on another machine...
The problem is when i have obtained the ip i store it in a file ! using awk i retrieve the ip and i'm trying to execute the command ifconfig eth0 x.x.x.x !! as it needs admin privileges it is currently not working.. i need to figure out a way such that at boot up without asking the password the program should run.... please help me!!!

Hi,

have a look at linux init scripts:

https://www.linux.com/learn/tutorials/442412-managing-linux-daemons-with-init-scripts

see ya
fra