mirror of
https://github.com/YunoHost-Apps/hubzilla_ynh.git
synced 2024-09-03 19:26:21 +02:00
Udated to version 4.0.2
This commit is contained in:
parent
ff6d512419
commit
6a322022b3
7 changed files with 33 additions and 16 deletions
|
@ -3,11 +3,8 @@
|
|||
[](https://dash.yunohost.org/appci/app/hubzilla)
|
||||
[](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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=
|
||||
|
|
|
@ -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=
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue