diff --git a/README.md b/README.md index fb8b46db..da03e3aa 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,8 @@ [![Integration level](https://dash.yunohost.org/integration/hubzilla.svg)](https://dash.yunohost.org/appci/app/hubzilla) [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=hubzilla) -> *This package allow you to install Hubzilla quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* - -Version: **4.0.1** +Version: **4.0.2** ### Interesting links diff --git a/check_process b/check_process index 3b35eb07..b78eb847 100644 --- a/check_process +++ b/check_process @@ -37,9 +37,4 @@ Level 10=0 ;;; Options Email=anmol@datamol.org -Notification= -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - +Notification=change diff --git a/conf/app.src b/conf/app.src index 0858d65c..95ea31e8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/hubzilla/core/-/archive/4.0.1/core-4.0.1.tar.gz -SOURCE_SUM=07c9bc45a3a62758fa76db2f3c2e3ca7ebd4a63c2b76959ac10eb7bc9225cf3a +SOURCE_URL=https://framagit.org/hubzilla/core/-/archive/4.0.2/core-4.0.2.tar.gz +SOURCE_SUM=f7652dc640d2c9dd0d21bfd1846c6bea2bae5da8b43aa0461a446e8bc84c7415 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR= diff --git a/conf/app_addons.src b/conf/app_addons.src index f5d90d1b..39ba35c8 100644 --- a/conf/app_addons.src +++ b/conf/app_addons.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/hubzilla/addons/-/archive/4.0.1/addons-4.0.1.tar.gz -SOURCE_SUM=c5235b01182cb888f4e2d37da83a130cbd827624015a82bac60f4042d1b2666c +SOURCE_URL=https://framagit.org/hubzilla/addons/-/archive/4.0.2/addons-4.0.2.tar.gz +SOURCE_SUM=43b0a969a46baf455be106598e85910aaf9136ef04eaf51b9469bf1236fcadfe SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR= diff --git a/manifest.json b/manifest.json index b634b06f..d198e600 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ }, "url": "https://zotlabs.org/page/hubzilla/hubzilla-project", "license": "MIT", - "version": "4.0.1~ynh1", + "version": "4.0.2~ynh1", "maintainer": { "name": "Anmol Sharma", "email": "anmol@datamol.org", diff --git a/scripts/_common.sh b/scripts/_common.sh index 234217a3..a76b808b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -75,6 +75,31 @@ ynh_remove_fail2ban_config () { sudo systemctl restart fail2ban } +ynh_smart_mktemp () { + local min_size="${1:-300}" + # Transform the minimum size from megabytes to kilobytes + min_size=$(( $min_size * 1024 )) + + # Check if there's enough free space in a directory + is_there_enough_space () { + local free_space=$(df --output=avail "$1" | sed 1d) + test $free_space -ge $min_size + } + + if is_there_enough_space /tmp; then + local tmpdir=/tmp + elif is_there_enough_space /var; then + local tmpdir=/var + elif is_there_enough_space /; then + local tmpdir=/ + elif is_there_enough_space /home; then + local tmpdir=/home + else + ynh_die "Insufficient free space to continue..." + fi + + echo "$(sudo mktemp --directory --tmpdir="$tmpdir")" +} #================================================= # FUTURE OFFICIAL HELPERS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0a123bae..479c7671 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,7 +58,7 @@ ynh_abort_if_errors #================================================= ynh_print_info "Upgrading source files..." # Create a temporary directory -tmpdir="$(mktemp -d)" +tmpdir="$(ynh_smart_mktemp 6000)" # Backup the config file in the temp dir cp -a "$final_path/.htconfig.php" "$tmpdir/.htconfig.php" cp -a "$final_path/store" "$tmpdir/store"