diff options
author | Daniel Hansson <github@hanssonit.se> | 2021-10-14 15:09:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 15:09:28 +0300 |
commit | c92796eadb2ad1eb314fc381aa06b2e4098b2686 (patch) | |
tree | f17b5031e14b6686d895b324a6ca27a144a06c58 | |
parent | 519d2f8042bda8ce0f1df01a20df2bb556886d81 (diff) |
fix nextcloud.sh (#2115)
-rw-r--r-- | nextcloud_update.sh | 23 | ||||
-rw-r--r-- | static/nextcloud.sh | 4 |
2 files changed, 4 insertions, 23 deletions
diff --git a/nextcloud_update.sh b/nextcloud_update.sh index bc260909..dcfa42b0 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -570,27 +570,8 @@ then fi # Fix bug in nextcloud.sh -CURRUSR="$(getent group sudo | cut -d: -f4 | cut -d, -f1)" -if grep -q "6.ifcfg.me" $SCRIPTS/nextcloud.sh &>/dev/null -then - rm -f "$SCRIPTS/nextcloud.sh" - download_script STATIC nextcloud - chown "$CURRUSR":"$CURRUSR" "$SCRIPTS/nextcloud.sh" - chmod +x "$SCRIPTS/nextcloud.sh" -elif [ -f $SCRIPTS/techandme.sh ] -then - rm -f "$SCRIPTS/techandme.sh" - download_script STATIC nextcloud - chown "$CURRUSR":"$CURRUSR" "$SCRIPTS/nextcloud.sh" - chmod +x "$SCRIPTS/nextcloud.sh" - if [ -f /home/"$CURRUSR"/.bash_profile ] - then - sed -i "s|techandme|nextcloud|g" /home/"$CURRUSR"/.bash_profile - elif [ -f /home/"$CURRUSR"/.profile ] - then - sed -i "s|techandme|nextcloud|g" /home/"$CURRUSR"/.profile - fi -fi +curl_to_dir https://raw.githubusercontent.com/nextcloud/vm/master/static/ nextcloud.sh "$SCRIPTS" +chown "$UNIXUSER":"$UNIXUSER" "$SCRIPTS"/nextcloud.sh # Update all Nextcloud apps if [ "${CURRENTVERSION%%.*}" -ge "15" ] diff --git a/static/nextcloud.sh b/static/nextcloud.sh index cdcb56db..3b88d300 100644 --- a/static/nextcloud.sh +++ b/static/nextcloud.sh @@ -2,8 +2,8 @@ # T&M Hansson IT AB © - 2021, https://www.hanssonit.se/ -WANIP6=$(curl -s -k -m 5 https://ipv6bot.whatismyipaddress.com) -WANIP4=$(curl -s -k -m 5 https://ipv4bot.whatismyipaddress.com) +WANIP6=$(curl -s -k -m 5 -6 icanhazip.com) +WANIP4=$(curl -s -k -m 5 -4 icanhazip.com) ADDRESS=$(hostname -I | cut -d ' ' -f 1) clear |