In initscript.sh, can i input from the user?

When creating the app, is there a way to get input from the user at initscript.sh and add it to the environment variable?
I did, in initscript.sh

echo "Enter the Authentication Server IP: "
read ip
sed -i "s/<!--SERVERIP-->/$ip/gi" ${CONFIGFILE_PATH}/UmModuleEx.config

I tried this, but it didn’t succeed. And i have one more quesition. Can I get the ip address of the client attempting to log in to Wbm?

Can I get the ip address of the client attempting to log in to Wbm?By default, nginx logs some messages to the syslog auth.log file (/var/log/auth.log), including successful login attempts.
Unsuccessful login attempts to WBM don’t seem to include the client IP address.
It may be possible to change the nginx configuration and/or the syslog configuration to log the required information.