From 88b8511721038369a27f7b7d7db4ebba30d2b0fa Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 15 Jan 2019 22:56:20 +0100 Subject: [PATCH] mute errors of temp server --- home.admin/config.scripts/lnd.export.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/lnd.export.sh b/home.admin/config.scripts/lnd.export.sh index 4e2c346..cba0c97 100644 --- a/home.admin/config.scripts/lnd.export.sh +++ b/home.admin/config.scripts/lnd.export.sh @@ -86,6 +86,7 @@ elif [ ${exportType} = "http" ]; then local_ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') randomPortNumber=$(shuf -i 20000-39999 -n 1) + sudo ufw allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server' clear echo "###### DOWNLOAD BY HTTP ######" echo "" @@ -102,8 +103,7 @@ elif [ ${exportType} = "http" ]; then sudo cp /home/bitcoin/.lnd/tls.cert ./${randomFolderName}/tls.cert cd ${randomFolderName} sudo chmod 444 *.* - sudo ufw allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server' - python -m SimpleHTTPServer ${randomPortNumber} + python -m SimpleHTTPServer ${randomPortNumber} 2>/dev/null sudo ufw delete allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server' cd .. sudo rm -r ${randomFolderName}