diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-05-28 06:50:40 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-05-28 06:51:03 +0300 |
commit | 83bc0770568381c1fbbf750c7443ec539d961996 (patch) | |
tree | d9ea0907fbadf770966db049f5462e463f14c539 | |
parent | ed0a368e7102d12bb56aef57a27b573ef960fd76 (diff) |
noip: fix download
-rw-r--r-- | etc/ncp-config.d/no-ip.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/ncp-config.d/no-ip.sh b/etc/ncp-config.d/no-ip.sh index 1e610c9b..b183f260 100644 --- a/etc/ncp-config.d/no-ip.sh +++ b/etc/ncp-config.d/no-ip.sh @@ -22,10 +22,12 @@ install() { apt-get update apt-get install --no-install-recommends -y make - mkdir /tmp/noip && cd /tmp/noip - wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz - tar vzxf noip-duc-linux.tar.gz - cd -; cd "$OLDPWD"/noip-2* + local TMPDIR="$( mktemp -d /tmp/noip.XXXXXX )" + cd "$TMPDIR" + wget -O- --content-disposition https://github.com/nachoparker/noip-DDNS/archive/master/latest.tar.gz \ + | tar -xz \ + || return 1 + cd -; cd "$OLDPWD"/noip-DDNS-master/ make cp noip2 /usr/local/bin/ @@ -47,7 +49,7 @@ EOF chmod +x /etc/init.d/noip2 cd - - rm -r /tmp/noip + rm -r "$TMPDIR" update-rc.d noip2 defaults update-rc.d noip2 disable |