From 98bccdf7373d4dc10a94813ec7797dee5915748a Mon Sep 17 00:00:00 2001 From: glen Date: Mon, 2 Nov 2020 17:36:27 -0500 Subject: [PATCH] update to Lokinet 0.8 and utilize nginx for webserver --- installers/common.sh | 9 +++++---- installers/snappsetup.sh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index c7b708a..9c48f68 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -130,8 +130,8 @@ function install_complete() { #provide option to launch and display lokinet address install_log "Installation completed!" - IP="10.0.0.1" - snapp_address=$(nslookup $IP | sed -n 's/.*arpa.*name = \(.*\)/\1/p') + IP="127.3.2.1" + snapp_address=$(host -t cname localhost.loki $IP | sed -n 's/.*arpa.*name = \(.*\)/\1/p') install_warning "Your Lokinet Address is:\nhttp://${snapp_address}" install_warning "Place your snapp in ${snapp_dir}" echo -n "Do you wish to go live with test snapp? [y/N]: " @@ -141,8 +141,9 @@ function install_complete() { exit 0 fi install_log "Server Launching" - sed -i "s|/home/pi/snapp|/home/$username/snapp|g" /usr/local/bin/snapp - sudo screen -S snapp -d -m python3 -m http.server --bind localhost.loki 80 --directory $snapp_dir + #sed -i "s|/home/pi/snapp|/home/$username/snapp|g" /usr/local/bin/snapp + #sudo screen -S snapp -d -m python3 -m http.server --bind localhost.loki 80 --directory $snapp_dir + sudo systemctl restart nginx exit 0 || install_error "Unable to exit" } diff --git a/installers/snappsetup.sh b/installers/snappsetup.sh index 228eb5f..447b01d 100644 --- a/installers/snappsetup.sh +++ b/installers/snappsetup.sh @@ -14,7 +14,7 @@ function install_dependencies() { curl -s https://deb.imaginary.stream/public.gpg | sudo apt-key add - echo "deb https://deb.imaginary.stream $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/imaginary.stream.list sudo apt-get update - sudo yes | apt-get install git screen dnsutils python3 resolvconf lokinet || install_error "Unable to install dependencies" + sudo yes | apt-get install git screen nginx dnsutils python3 resolvconf lokinet || install_error "Unable to install dependencies" } install_pihost