1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00

Merge branch 'testing' into fix-upgrade

This commit is contained in:
Éric Gaspar 2022-01-24 23:15:09 +01:00 committed by GitHub
commit d6e04fd377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 26 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Photo-management-system to manage and share photos
**Shipped version:** 4.4~ynh1
**Shipped version:** 4.4~ynh2
**Demo:** https://lycheeorg.github.io/demo/

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Système de gestion de photos pour gérer et partager des photos
**Version incluse :** 4.4~ynh1
**Version incluse :** 4.4~ynh2
**Démo :** https://lycheeorg.github.io/demo/

View file

@ -33,7 +33,7 @@ TIMEZONE=UTC
# folders in which the files will be stored
LYCHEE_DIST="__FINALPATH__/public/dist/"
LYCHEE_UPLOADS="__DATADIR__/uploads/"
LYCHEE_UPLOADS="__PUBLIC_PATH__/uploads/"
# url to access those files
# LYCHEE_DIST_URL="dist/"

View file

@ -26,7 +26,7 @@ location ^~ __PATH__/ {
}
location __PATH__/uploads/ {
alias __DATADIR__/uploads/ ;
alias __PUBLIC_PATH__/uploads/ ;
}
# Include SSOWAT user panel.

View file

@ -6,7 +6,7 @@
"en": "Photo-management-system to manage and share photos",
"fr": "Système de gestion de photos pour gérer et partager des photos"
},
"version": "4.4~ynh1",
"version": "4.4~ynh2",
"url": "https://lycheeorg.github.io/",
"upstream": {
"license": "MIT",

View file

@ -24,7 +24,7 @@ ynh_print_info --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
@ -44,7 +44,7 @@ ynh_backup --src_path="$final_path"
# BACKUP MEDIA FOLDER
#=================================================
ynh_backup --src_path="$datadir" --is_big
ynh_backup --src_path="$public_path" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION

View file

@ -31,7 +31,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP

View file

@ -90,15 +90,15 @@ chown -R $app:www-data "$final_path"
#=================================================
ynh_script_progression --message="Creating a data directory..." --weight=1
datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
public_path=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
mkdir -p $datadir/uploads
mkdir -p $datadir/uploads/{big,import,medium,raw,small,thumb}
mkdir -p $public_path/uploads
mkdir -p $public_path/uploads/{big,import,medium,raw,small,thumb}
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
chmod 750 "$public_path"
chmod -R o-rwx "$public_path"
chown -R $app:www-data "$public_path"
#=================================================
# NGINX CONFIGURATION

View file

@ -18,7 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
@ -40,7 +40,7 @@ ynh_secure_remove --file="$final_path"
if [ "$YNH_APP_PURGE" == true ]
then
ynh_script_progression --message="Removing $app data directory..." --weight=2
ynh_secure_remove --file="$datadir"
ynh_secure_remove --file="$public_path"
fi
#=================================================

View file

@ -25,7 +25,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
@ -71,13 +71,13 @@ chown -R $app:www-data "$final_path"
ynh_script_progression --message="Restoring the data directory..."
# 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="$public_path" --not_mandatory
mkdir -p $datadir
mkdir -p $public_path
chmod 755 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
chmod 755 "$public_path"
chmod -R o-rwx "$public_path"
chown -R $app:www-data "$public_path"
#=================================================
# REINSTALL DEPENDENCIES

View file

@ -19,7 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
app_key=$(ynh_app_setting_get --app=$app --key=app_key)
@ -158,8 +158,6 @@ ynh_script_progression --message="Setting $app config..."
# Setup application config
#ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
#ynh_add_config --template="../conf/user.css.example" --destination="$final_path/public/dist/user.css"
ynh_replace_string --match_string="\$ffmpeg = FFMpeg::create();" --replace_string="\$ffmpeg = FFMpeg::create(array(\
'ffmpeg.binaries' => '/usr/bin/ffmpeg',\
'ffprobe.binaries' => '/usr/bin/ffprobe',\