mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
check if root first
This commit is contained in:
parent
013afb7d48
commit
7beb71cfbf
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user