From bb612fea061ed2845ca6444607b21de4b080abe6 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Sun, 17 Dec 2017 17:32:46 +0100 Subject: [PATCH] more msg_box (#429) * more msg_box * fix https://github.com/nextcloud/vm/issues/427 * Update fail2ban.sh --- apps/fail2ban.sh | 9 ++++----- static/adduser.sh | 15 +++++++-------- static/nextcloud.sh | 14 +++----------- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/apps/fail2ban.sh b/apps/fail2ban.sh index 3650aebe..8b038eac 100644 --- a/apps/fail2ban.sh +++ b/apps/fail2ban.sh @@ -121,9 +121,8 @@ check_command update-rc.d fail2ban enable check_command service fail2ban restart # The End -echo -echo "Fail2ban is now sucessfully installed." -echo "Please use 'fail2ban-client set nextcloud unbanip ' to unban certain IPs" -echo "You can also use 'iptables -L -n' to check which IPs that are banned" -any_key "Press any key to continue..." +msg_box "Fail2ban is now sucessfully installed. + +Please use 'fail2ban-client set nextcloud unbanip ' to unban certain IPs +You can also use 'iptables -L -n' to check which IPs that are banned" clear diff --git a/static/adduser.sh b/static/adduser.sh index ee09fadf..adaf3971 100644 --- a/static/adduser.sh +++ b/static/adduser.sh @@ -14,14 +14,13 @@ debug_mode if [[ $UNIXUSER != "ncadmin" ]] then - echo - echo "Current user with sudo permissions is: $UNIXUSER". - echo "This script will set up everything with that user." - echo "If the field after ':' is blank you are probably running as a pure root user." - echo "It's possible to install with root, but there will be minor errors." - echo - echo "Please create a user with sudo permissions if you want an optimal installation." - echo "The preferred user is 'ncadmin'." +msg_box "Current user with sudo permissions is: $UNIXUSER. +This script will set up everything with that user. +If the field after ':' is blank you are probably running as a pure root user. +It's possible to install with root, but there will be minor errors. + +Please create a user with sudo permissions if you want an optimal installation. +The preferred user is 'ncadmin'." if [[ "no" == $(ask_yes_or_no "Do you want to create a new user?") ]] then echo "Not adding another user..." diff --git a/static/nextcloud.sh b/static/nextcloud.sh index 48b63d4c..df8b0b50 100644 --- a/static/nextcloud.sh +++ b/static/nextcloud.sh @@ -2,17 +2,9 @@ # Tech and Me © - 2017, https://www.techandme.se/ -# shellcheck disable=2034,2059 -true -# shellcheck source=lib.sh -LOAD_IP6=1 . <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh) -unset LOAD_IP6 - -# Check for errors + debug code and abort if something isn't right -# 1 = ON -# 0 = OFF -DEBUG=0 -debug_mode +WANIP6=$(curl -s -k -m 7 https://6.ifcfg.me) +WANIP4=$(curl -s -m 5 ipinfo.io/ip) +ADDRESS=$(hostname -I | cut -d ' ' -f 1) clear figlet -f small Nextcloud