mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
commit
5dcd677159
10 changed files with 18 additions and 153 deletions
|
@ -30,7 +30,7 @@ this package:
|
||||||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 26.0.2~ynh2
|
**Shipped version:** 26.0.3~ynh1
|
||||||
|
|
||||||
**Demo:** https://demo.nextcloud.com/
|
**Demo:** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
|
||||||
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal
|
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 26.0.2~ynh2
|
**Version incluse :** 26.0.3~ynh1
|
||||||
|
|
||||||
**Démo :** https://demo.nextcloud.com/
|
**Démo :** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
|
17
actions.toml
17
actions.toml
|
@ -1,17 +0,0 @@
|
||||||
[disable_maintenance]
|
|
||||||
name = "Disable the maintenance mode of Nextcloud"
|
|
||||||
command = "/bin/bash scripts/actions/disable_maintenance"
|
|
||||||
# user = "root" # optional
|
|
||||||
# cwd = "/" # optional
|
|
||||||
# accepted_return_codes = [0, 1, 2, 3] # optional
|
|
||||||
accepted_return_codes = [0]
|
|
||||||
description = "Disable the maintenance mode of Nextcloud if you're stuck after an upgrade"
|
|
||||||
|
|
||||||
[add_multimedia_directories]
|
|
||||||
name = "Add multimedia directories"
|
|
||||||
command = "/bin/bash scripts/actions/add_multimedia_directories"
|
|
||||||
# user = "root" # optional
|
|
||||||
# cwd = "/" # optional
|
|
||||||
# accepted_return_codes = [0, 1, 2, 3] # optional
|
|
||||||
accepted_return_codes = [0]
|
|
||||||
description = "Add the multimedia and shared multimedia directories again"
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Online storage, file sharing platform and various other applications",
|
"en": "Online storage, file sharing platform and various other applications",
|
||||||
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
||||||
},
|
},
|
||||||
"version": "26.0.2~ynh2",
|
"version": "26.0.3~ynh1",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 11.1.15"
|
"yunohost": ">= 11.1.21"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC STARTING
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source scripts/_common.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RETRIEVE ARGUMENTS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF ARGUMENTS ARE CORRECT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# DEFINE FUNCTION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
|
||||||
exec_occ() {
|
|
||||||
(cd "$final_path" && exec_as "$app" \
|
|
||||||
php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define a function to add an external storage
|
|
||||||
# Create the external storage for the given folders and enable sharing
|
|
||||||
create_external_storage() {
|
|
||||||
local datadir="$1"
|
|
||||||
local mount_name="$2"
|
|
||||||
local mount_id=`exec_occ files_external:create --output=json \
|
|
||||||
"$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true`
|
|
||||||
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
|
||||||
&& ynh_print_warn --message="Unable to create external storage" \
|
|
||||||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC ACTION
|
|
||||||
#=================================================
|
|
||||||
# YUNOHOST MULTIMEDIA INTEGRATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Updating multimedia directories..." --weight=6
|
|
||||||
|
|
||||||
# Build YunoHost multimedia directories
|
|
||||||
ynh_multimedia_build_main_dir
|
|
||||||
# Mount the user directory in Nextcloud
|
|
||||||
exec_occ app:enable files_external
|
|
||||||
create_external_storage "/home/yunohost.multimedia/\$user" "Multimedia"
|
|
||||||
create_external_storage "/home/yunohost.multimedia/share" "Shared multimedia"
|
|
||||||
# Allow nextcloud to write into these directories
|
|
||||||
ynh_multimedia_addaccess $app
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# END OF SCRIPT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Execution completed" --last
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC STARTING
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source scripts/_common.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RETRIEVE ARGUMENTS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF ARGUMENTS ARE CORRECT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF AN ACTION HAS TO BE DONE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Check the current status of the maintenance mode
|
|
||||||
|
|
||||||
if [ "$(grep "maintenance" "$final_path/config/config.php" | awk '{print $3}' | cut -d',' -f1)" != "true" ]
|
|
||||||
then
|
|
||||||
ynh_die --message="Nextcloud isn't currently under maintenance." --ret_code=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC ACTION
|
|
||||||
#=================================================
|
|
||||||
# DISABLE THE MAINTENANCE MODE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Disabling maintenance mode..." --weight=3
|
|
||||||
|
|
||||||
(
|
|
||||||
cd "$final_path" && exec_as "$app" \
|
|
||||||
php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode --off
|
|
||||||
)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# END OF SCRIPT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Execution completed" --last
|
|
|
@ -336,10 +336,10 @@ ynh_multimedia_addaccess $app
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: "$datadir"
|
chown -R $app: "$datadir"
|
||||||
find $final_path/ -type f -print0 | xargs -0 chmod 0644
|
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $final_path/ -type d -print0 | xargs -0 chmod 0755
|
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $datadir/ -type f -print0 | xargs -0 chmod 0640
|
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
find $datadir/ -type d -print0 | xargs -0 chmod 0750
|
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
|
||||||
chmod 640 "$final_path/config/config.php"
|
chmod 640 "$final_path/config/config.php"
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
chmod 750 $final_path
|
chmod 750 $final_path
|
||||||
|
|
|
@ -139,10 +139,10 @@ mkdir -p "$datadir"
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: "$datadir"
|
chown -R $app: "$datadir"
|
||||||
find $final_path/ -type f -print0 | xargs -0 chmod 0644
|
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $final_path/ -type d -print0 | xargs -0 chmod 0755
|
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $datadir/ -type f -print0 | xargs -0 chmod 0640
|
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
find $datadir/ -type d -print0 | xargs -0 chmod 0750
|
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
|
||||||
chmod 640 "$final_path/config/config.php"
|
chmod 640 "$final_path/config/config.php"
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
chmod 750 $final_path
|
chmod 750 $final_path
|
||||||
|
|
|
@ -452,10 +452,10 @@ exec_occ background:cron
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: "$datadir"
|
chown -R $app: "$datadir"
|
||||||
find $final_path/ -type f -print0 | xargs -0 chmod 0644
|
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $final_path/ -type d -print0 | xargs -0 chmod 0755
|
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $datadir/ -type f -print0 | xargs -0 chmod 0640
|
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
find $datadir/ -type d -print0 | xargs -0 chmod 0750
|
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
|
||||||
chmod 640 "$final_path/config/config.php"
|
chmod 640 "$final_path/config/config.php"
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
chmod 750 $final_path
|
chmod 750 $final_path
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available Nextcloud version
|
# Last available Nextcloud version
|
||||||
next_version="26.0.2"
|
next_version="26.0.3"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="f3db0ec5e0aaff7c088eb34f752d77d79913bc6784e0fc47a84cdaa28e567a33"
|
nextcloud_source_sha256="a5a810cbcd7c3dcff25f22809321f2ed41ed7cc0601204489ac90e258060b5c9"
|
||||||
|
|
Loading…
Add table
Reference in a new issue