Change from curl to wget (#145)
This commit is contained in:
Родитель
77cb198fc3
Коммит
0f4d46f5d9
|
@ -164,7 +164,7 @@ fi
|
|||
# Check if $domain exists and is reachable
|
||||
echo
|
||||
echo "Checking if $domain exists and is reachable..."
|
||||
curl -s -m 20 $domain > /dev/null
|
||||
wget -q -T 10 -t 2 $domain > /dev/null
|
||||
if [[ $? > 0 ]]
|
||||
then
|
||||
echo "Nope, it's not there. You have to create $domain and point"
|
||||
|
|
|
@ -42,7 +42,7 @@ fi
|
|||
# Check network
|
||||
echo "Testing if network is OK..."
|
||||
service networking restart
|
||||
curl -s http://github.com > /dev/null
|
||||
wget -q -T 10 -t 2 http://github.com > /dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo -e "\e[32mOnline!\e[0m"
|
||||
|
@ -57,7 +57,7 @@ fi
|
|||
# Check network
|
||||
echo "Testing if network is OK..."
|
||||
service networking restart
|
||||
curl -s http://github.com > /dev/null
|
||||
wget -q -T 10 -t 2 http://github.com > /dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo -e "\e[32mOnline!\e[0m"
|
||||
|
|
|
@ -106,7 +106,7 @@ if ! version 16.04 "$DISTRO" 16.04.4; then
|
|||
fi
|
||||
|
||||
# Check if key is available
|
||||
if curl -s "$NCREPO" > /dev/null
|
||||
if wget -q -T 10 -t 2 "$NCREPO" > /dev/null
|
||||
then
|
||||
echo "Nextcloud repo OK"
|
||||
else
|
||||
|
|
|
@ -22,7 +22,7 @@ NCREPO="https://download.nextcloud.com/server/releases"
|
|||
SECURE="$SCRIPTS/setup_secure_permissions_nextcloud.sh"
|
||||
# Versions
|
||||
CURRENTVERSION=$(sudo -u www-data php $NCPATH/occ status | grep "versionstring" | awk '{print $3}')
|
||||
NCVERSION=$(curl -s --max-time 900 $NCREPO/ | tac | grep unknown.gif | sed 's/.*"nextcloud-\([^"]*\).zip.sha512".*/\1/;q')
|
||||
NCVERSION=$(curl -s -m 900 $NCREPO/ | tac | grep unknown.gif | sed 's/.*"nextcloud-\([^"]*\).zip.sha512".*/\1/;q')
|
||||
|
||||
# Must be root
|
||||
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; }
|
||||
|
|
|
@ -96,7 +96,7 @@ fi
|
|||
# Check if $SUBDOMAIN exists and is reachable
|
||||
echo
|
||||
echo "Checking if $SUBDOMAIN exists and is reachable..."
|
||||
curl -s -m 20 $SUBDOMAIN > /dev/null
|
||||
wget -q -T 10 -t 2 $SUBDOMAIN > /dev/null
|
||||
if [[ $? > 0 ]]
|
||||
then
|
||||
echo "Nope, it's not there. You have to create $SUBDOMAIN and point"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
WANIP4=$(curl -s ipinfo.io/ip -m 5)
|
||||
WANIP6=$(curl -s 6.ifcfg.me -m 5)
|
||||
WANIP4=$(curl -s -m 5 ipinfo.io/ip)
|
||||
WANIP6=$(curl -s -m 5 6.ifcfg.me)
|
||||
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
|
||||
clear
|
||||
figlet -f small Nextcloud
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
curl -s http://google.com > /dev/null
|
||||
wget -q -T 10 -t 2 http://google.com > /dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
ntpdate -s 1.se.pool.ntp.org
|
||||
|
|
Загрузка…
Ссылка в новой задаче