diff --git a/static/collabora.sh b/static/collabora.sh index 22514fc9..67b4a57d 100644 --- a/static/collabora.sh +++ b/static/collabora.sh @@ -1,6 +1,15 @@ #!/bin/bash # Collabora auto installer +# Check if root +if [ "$(whoami)" != "root" ] +then + echo + echo -e "\e[31mSorry, you are not root.\n\e[0mYou must type: \e[36msudo \e[0mbash $SCRIPTS/collabora.sh" + echo + exit 1 +fi + ## Variable's # Docker URL SUBDOMAIN=$(whiptail --title "Techandme.se Collabora" --inputbox "Collabora subdomain eg: office.yourdomain.com" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3) @@ -16,15 +25,6 @@ WANIP4=$(dig +short myip.opendns.com @resolver1.opendns.com) # Misc SCRIPTS=/var/scripts -# Check if root -if [ "$(whoami)" != "root" ] -then - echo - echo -e "\e[31mSorry, you are not root.\n\e[0mYou must type: \e[36msudo \e[0mbash $SCRIPTS/collabora.sh" - echo - exit 1 -fi - # Whiptail auto size calc_wt_size() { WT_HEIGHT=17