From 373fe7e0db82fe3bd18c97ea404c67a2a7aba367 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 10 Apr 2018 12:43:42 +0200 Subject: [PATCH] Improved install script --- install.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index fb27099c..89ef9600 100755 --- a/install.sh +++ b/install.sh @@ -46,7 +46,16 @@ git clone https://github.com/animenotifier/database ~/.aero/db/arn make ports # Add "127.0.0.1 beta.notify.moe" to /etc/hosts -sudo -- sh -c -e "echo '127.0.0.1 beta.notify.moe' >> /etc/hosts" +if grep -Fxq "127.0.0.1 beta.notify.moe" /etc/hosts; then + echo "beta.notify.moe already resolves to localhost" +else + sudo -- sh -c -e "echo '127.0.0.1 beta.notify.moe' >> /etc/hosts" + echo "beta.notify.moe now resolves to localhost" +fi # Test -make test \ No newline at end of file +make test + +# Finished +echo "Finished installation." +echo "You can now execute the 'run' command and open https://beta.notify.moe in your browser."