#!/bin/bash # LGSM fn_autoip function # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk # Version: 010115 # Description: Identifies the server interface IP. # If multiple interfaces this will need to be set manually. if [ ! -f /bin/ip ]; then ipcommand="/sbin/ip" else ipcommand="ip" fi getip=$(hostname -I) if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then ip=${getip} fi