X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=bin%2Fkratochvil.vellum.cz-update;h=bbf31130142aebacb648666e4c80aeab72dfd9bc;hb=e9c5c74b8f4cd59588fe518b4753d121b4877536;hp=99b5c01545d015a2e1227225f948cf2feb44efeb;hpb=fc8feb0089fdde84a26ec2d8bafd1b97a5da5197;p=nethome.git diff --git a/bin/kratochvil.vellum.cz-update b/bin/kratochvil.vellum.cz-update index 99b5c01..bbf3113 100755 --- a/bin/kratochvil.vellum.cz-update +++ b/bin/kratochvil.vellum.cz-update @@ -2,6 +2,7 @@ lockfile="/home/short/bin/kratochvil.vellum.cz-update.lock" kratochvil_IP="`echo "${SSH_CLIENT:-$SSH2_CLIENT}"|cut -d ' ' -f 1`" +kratochvil_IP="${1:-$kratochvil_IP}" kratochvil_IP_back="`echo "$kratochvil_IP"|sed 's/\./\\\\./g'`" named_dir="/etc/named" cf_file="$named_dir/cf/kratochvil.vellum.cz" @@ -20,6 +21,6 @@ if grep -q '^ `'"$kratochvil_IP_back'"'$' "$cf_file";then echo "$0: Updating new IP $kratochvil_IP..." echo -e '%s#\(^ `\)[0-9.]*\('"'"'\)$#\\1'"$kratochvil_IP"'\\2#\nw'|ed -s "$cf_file" make -C "$named_dir" --assume-new="ver/.version" -/home/short/secure/ndc-reload-short +/home/short/secure/ndc-reload-short kratochvil.vellum.cz echo "$0: Update done." exit 0