mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
commit
892f02888f
12 changed files with 41 additions and 21 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Online storage, file sharing platform and various other applications
|
Online storage, file sharing platform and various other applications
|
||||||
|
|
||||||
**Shipped version:** 22.2.0~ynh1
|
**Shipped version:** 22.2.3~ynh1
|
||||||
|
|
||||||
**Demo:** https://demo.nextcloud.com/
|
**Demo:** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Stockage en ligne, plateforme de partage de fichiers et diverses autres applications
|
Stockage en ligne, plateforme de partage de fichiers et diverses autres applications
|
||||||
|
|
||||||
**Version incluse :** 22.2.0~ynh1
|
**Version incluse :** 22.2.3~ynh1
|
||||||
|
|
||||||
**Démo :** https://demo.nextcloud.com/
|
**Démo :** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
"password": ""
|
"password": ""
|
||||||
},
|
},
|
||||||
"hashing_default_password": true,
|
"hashing_default_password": true,
|
||||||
"localstorage.allowsymlinks": true
|
"localstorage.allowsymlinks": true,
|
||||||
|
"simpleSignUpLink.shown": false
|
||||||
},
|
},
|
||||||
"apps": {
|
"apps": {
|
||||||
"user_ldap": {
|
"user_ldap": {
|
||||||
|
|
|
@ -21,11 +21,6 @@ location ^~ __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/;
|
alias __FINALPATH__/;
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add headers to serve security related headers
|
# Add headers to serve security related headers
|
||||||
more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;";
|
more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;";
|
||||||
more_set_headers "Referrer-Policy: no-referrer";
|
more_set_headers "Referrer-Policy: no-referrer";
|
||||||
|
|
|
@ -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": "22.2.0~ynh1",
|
"version": "22.2.3~ynh1",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.8.3"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at"
|
|
||||||
|
|
||||||
YNH_PHP_VERSION="7.3"
|
YNH_PHP_VERSION="7.3"
|
||||||
extra_php_dependencies="php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
|
|
|
@ -27,6 +27,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
@ -84,7 +85,7 @@ ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Backing up data directory..."
|
ynh_print_info --message="Backing up data directory..."
|
||||||
|
|
||||||
ynh_backup --src_path="/home/yunohost.app/${app}/data" --is_big
|
ynh_backup --src_path="$datadir" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -104,7 +104,7 @@ ynh_system_user_create --username=$app
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=50
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=50
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
# Create a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION
|
||||||
# Used by ynh_add_nginx_config
|
# Used by ynh_add_nginx_config
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
|
@ -130,9 +130,12 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE THE DATA DIRECTORY
|
# CREATE THE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Creating a data directory..." --weight=1
|
||||||
|
|
||||||
# Define app's data directory
|
# Define app's data directory
|
||||||
datadir="/home/yunohost.app/$app/data"
|
datadir="/home/yunohost.app/$app/data"
|
||||||
|
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||||
|
|
||||||
# Create app folders
|
# Create app folders
|
||||||
mkdir -p "$datadir"
|
mkdir -p "$datadir"
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
@ -46,6 +47,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=3
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Remove the data directory if --purge option is used
|
||||||
|
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Removing app data directory..." --weight=1
|
||||||
|
ynh_secure_remove --file="$datadir"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -28,6 +28,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
||||||
|
@ -100,7 +101,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
# Recreate a dedicated php-fpm config
|
# Recreate a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion --package="$extra_php_dependencies"
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE CRON FILE
|
# RESTORE THE CRON FILE
|
||||||
|
@ -119,8 +120,6 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring data directory..." --weight=2
|
ynh_script_progression --message="Restoring data directory..." --weight=2
|
||||||
|
|
||||||
datadir="/home/yunohost.app/$app/data"
|
|
||||||
|
|
||||||
# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup.
|
# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup.
|
||||||
ynh_restore_file --origin_path="$datadir" --not_mandatory
|
ynh_restore_file --origin_path="$datadir" --not_mandatory
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,12 @@ if [ -z "$final_path" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If datadir doesn't exist, create it
|
||||||
|
if [ -z "$datadir" ]; then
|
||||||
|
datadir=/home/yunohost.app/$app
|
||||||
|
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove the option backup_core_only if it's in the settings.yml file
|
# Remove the option backup_core_only if it's in the settings.yml file
|
||||||
ynh_app_setting_delete --app=$app --key=backup_core_only
|
ynh_app_setting_delete --app=$app --key=backup_core_only
|
||||||
|
|
||||||
|
@ -77,6 +83,11 @@ if ynh_legacy_permissions_exists; then
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create a permission if needed
|
||||||
|
if ! ynh_permission_exists --permission="api"; then
|
||||||
|
ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -151,7 +162,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Recreate a dedicated PHP-FPM config
|
# Recreate a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
|
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||||
|
|
||||||
# Delete existing ini configuration file (backward compatibility)
|
# Delete existing ini configuration file (backward compatibility)
|
||||||
if [ -f /etc/php/$phpversion/fpm/conf.d/20-$app.ini ]; then
|
if [ -f /etc/php/$phpversion/fpm/conf.d/20-$app.ini ]; then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available Nextcloud version
|
# Last available Nextcloud version
|
||||||
next_version="22.2.0"
|
next_version="22.2.3"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="273dba3ce43501b897e8b78996b50329e31da2b5402866ac20b318cdaddf3e1f"
|
nextcloud_source_sha256="66a29a6a490738c0abedb677cb68c7c91fabab3e6419a3c99d8b406899eb942a"
|
||||||
|
|
Loading…
Add table
Reference in a new issue