Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-02-08 16:10:30 +0300
committernachoparker <nacho@ownyourbits.com>2018-02-08 16:10:30 +0300
commitfc0d3f96f246fe179b626c143c138a17b08fcf8b (patch)
treefe6752b4d4504600e33673d9ab71b0260df07fad
parentab865519e232810307f93f65bac1894be1cf1e1d (diff)
do not rely on pings, just return value of operationsv0.46.4
-rwxr-xr-xbin/ncp-check-version7
-rwxr-xr-xbin/ncp-update6
-rw-r--r--etc/nextcloudpi-config.d/letsencrypt.sh2
-rw-r--r--etc/nextcloudpi-config.d/nc-nextcloud.sh6
-rw-r--r--etc/nextcloudpi-config.d/no-ip.sh2
5 files changed, 10 insertions, 13 deletions
diff --git a/bin/ncp-check-version b/bin/ncp-check-version
index 23335aaf..35b91181 100755
--- a/bin/ncp-check-version
+++ b/bin/ncp-check-version
@@ -4,11 +4,12 @@
[ $(id -u) -ne 0 ] && exit 1
-ping -W 2 -w 1 -q 4.2.2.2 &>/dev/null || { echo "No internet connectivity"; exit 1; }
-
rm -rf /tmp/ncp-check-tmp
-git clone --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-check-tmp || exit 1
+git clone --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-check-tmp {
+ echo "No internet connectivity"
+ exit 1
+}
cd /tmp/ncp-check-tmp || exit 1
VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" )
diff --git a/bin/ncp-update b/bin/ncp-update
index 1195ab4e..53cadc45 100755
--- a/bin/ncp-update
+++ b/bin/ncp-update
@@ -4,10 +4,12 @@
{
[ "$(id -u)" -ne 0 ] && { printf "Must be run as root. Try 'sudo $0'\n"; exit 1; }
- ping -W 2 -w 1 -q 4.2.2.2 &>/dev/null || { echo "No internet connectivity"; exit 1; }
echo -e "Downloading updates"
rm -rf /tmp/ncp-update-tmp
- git clone --depth 20 -q https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp || exit 1
+ git clone --depth 20 -q https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp || {
+ echo "No internet connectivity"
+ exit 1
+ }
cd /tmp/ncp-update-tmp
echo -e "Performing updates"
diff --git a/etc/nextcloudpi-config.d/letsencrypt.sh b/etc/nextcloudpi-config.d/letsencrypt.sh
index 519a4970..e7179ec8 100644
--- a/etc/nextcloudpi-config.d/letsencrypt.sh
+++ b/etc/nextcloudpi-config.d/letsencrypt.sh
@@ -57,8 +57,6 @@ EOF
# tested with git version v0.11.0-71-g018a304
configure()
{
- ping -W 2 -w 1 -q 4.2.2.2 &>/dev/null || { echo "No internet connectivity"; return 1; }
-
local DOMAIN_LOWERCASE="${DOMAIN_,,}"
grep -q ServerName $VHOSTCFG && \
diff --git a/etc/nextcloudpi-config.d/nc-nextcloud.sh b/etc/nextcloudpi-config.d/nc-nextcloud.sh
index 687d422e..31607d9b 100644
--- a/etc/nextcloudpi-config.d/nc-nextcloud.sh
+++ b/etc/nextcloudpi-config.d/nc-nextcloud.sh
@@ -90,8 +90,6 @@ install()
configure()
{
- ping -W 2 -w 1 -q 4.2.2.2 &>/dev/null || { echo "No internet connectivity"; return 1; }
-
## IF BETA SELECTED ADD "pre" to DOWNLOAD PATH
[[ "$BETA_" == yes ]] && local PREFIX="pre"
@@ -160,7 +158,7 @@ configure()
fi
# wait for mariadb
- pgrep -x mysqld &>/dev/null || { echo "mariaDB process not found"; return 1; }
+ pgrep -x mysqld &>/dev/null || echo "mariaDB process not found"
while :; do
[[ -S /var/run/mysqld/mysqld.sock ]] && break
@@ -184,6 +182,7 @@ EXIT
EOF
## SET APACHE VHOST
+ echo "Setting up Apache..."
cat > /etc/apache2/sites-available/nextcloud.conf <<'EOF'
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
@@ -206,7 +205,6 @@ EOF
</IfModule>
EOF
a2ensite nextcloud
- echo "Setting up Apache..."
cat > /etc/apache2/sites-available/000-default.conf <<'EOF'
<VirtualHost _default_:80>
diff --git a/etc/nextcloudpi-config.d/no-ip.sh b/etc/nextcloudpi-config.d/no-ip.sh
index 2504d772..cf3d8232 100644
--- a/etc/nextcloudpi-config.d/no-ip.sh
+++ b/etc/nextcloudpi-config.d/no-ip.sh
@@ -88,8 +88,6 @@ configure()
service noip2 stop
[[ $ACTIVE_ != "yes" ]] && { update-rc.d noip2 disable; return 0; }
- ping -W 2 -w 1 -q 4.2.2.2 &>/dev/null || { echo "No internet connectivity"; return 1; echo "noip DDNS disabled"; }
-
local IF=$( ip -br l | awk '{ if ( $2 == "UP" ) print $1 }' | head -1 )
[[ "$IF" != "" ]] && IF="-I $IF"