mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
use fetch_lib in Nextcloud startup script as well (#1460)
This commit is contained in:
parent
2152772822
commit
4d2064e5fb
@ -36,27 +36,11 @@ done
|
||||
is_process_running apt
|
||||
is_process_running dpkg
|
||||
|
||||
# Use local lib file in case there is no internet connection
|
||||
if print_text_in_color "$ICyan" "Testing internet connection..." && ping github.com -c 2 >/dev/null 2>&1
|
||||
then
|
||||
# shellcheck disable=2034,2059
|
||||
# shellcheck disable=2034,2059,1091
|
||||
true
|
||||
SCRIPT_NAME="Nextcloud First Startup Script"
|
||||
SCRIPT_NAME="Nextcloud Startup Script"
|
||||
# shellcheck source=lib.sh
|
||||
. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh)
|
||||
# If we have internet, then use the latest variables from the lib remote file
|
||||
elif [ -f /var/scripts/lib.sh ]
|
||||
then
|
||||
# shellcheck disable=2034,2059
|
||||
true
|
||||
SCRIPT_NAME="Nextcloud First Startup Script"
|
||||
# shellcheck source=lib.sh
|
||||
source /var/scripts/lib.sh
|
||||
else
|
||||
print_text_in_color "$IRed" "You don't seem to have a working internet connection, and /var/scripts/lib.sh is missing so you can't run this script."
|
||||
print_text_in_color "$IRed" "Please report this to https://github.com/nextcloud/vm/issues/"
|
||||
exit 1
|
||||
fi
|
||||
source /var/scripts/fetch_lib.sh
|
||||
|
||||
# Get all needed variables from the library
|
||||
first_iface
|
||||
@ -135,8 +119,11 @@ Please also post this issue on: https://github.com/nextcloud/vm/issues"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=2034,2059,1091
|
||||
true
|
||||
SCRIPT_NAME="Nextcloud Startup Script"
|
||||
# shellcheck source=lib.sh
|
||||
. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh)
|
||||
source /var/scripts/fetch_lib.sh
|
||||
|
||||
# Get all needed variables from the library
|
||||
ncdb
|
||||
|
||||
@ -27,8 +27,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
print_text_in_color "$ICyan" "Updating lib..."
|
||||
curl -sfL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh -o /var/scripts/lib.sh
|
||||
if ! [ -f /var/scripts/nextcloud-startup-script.sh ]
|
||||
then
|
||||
print_text_in_color "$ICyan" "Updating lib..."
|
||||
curl -sfL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh -o /var/scripts/lib.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck source=lib.sh
|
||||
|
||||
Loading…
Reference in New Issue
Block a user