X-Git-Url: https://hackdaworld.org/gitweb/?p=scripts%2Fscripts.git;a=blobdiff_plain;f=fai_backup.sh;fp=fai_backup.sh;h=95d4327ec08161debc1c42a1d6ab5ec487fdcc83;hp=110d8717000ae8b9251535f6fe068168db5d0fe5;hb=eadd953d72897302c90f17d371453132e8584441;hpb=d8baf2f1d4f9d7abd0a2990c2819f070275cfcc1 diff --git a/fai_backup.sh b/fai_backup.sh index 110d871..95d4327 100755 --- a/fai_backup.sh +++ b/fai_backup.sh @@ -30,7 +30,11 @@ backupdir="/mnt/tmp2" # initializing custom variables host=`hostname` -myip="`host $host | awk '{ print $4 }'`" +if [ -z $1 ] ; then + myip="`host $host | awk '{ print $4 }'`" +else + myip=$1 +fi res=$? if [ "$res" != "0" ] ; then echo "unable to determine the hosts ip address"