mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Merge branch 'testing' into add-config-panel
This commit is contained in:
commit
6bc325f810
11 changed files with 40 additions and 33 deletions
|
@ -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
|
Photo-management-system to manage and share photos
|
||||||
|
|
||||||
**Shipped version:** 4.4~ynh1
|
**Shipped version:** 4.4~ynh2
|
||||||
|
|
||||||
**Demo:** https://lycheeorg.github.io/demo/
|
**Demo:** https://lycheeorg.github.io/demo/
|
||||||
|
|
||||||
|
|
|
@ -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
|
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/
|
**Démo :** https://lycheeorg.github.io/demo/
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ TIMEZONE=UTC
|
||||||
|
|
||||||
# folders in which the files will be stored
|
# folders in which the files will be stored
|
||||||
LYCHEE_DIST="__FINALPATH__/public/dist/"
|
LYCHEE_DIST="__FINALPATH__/public/dist/"
|
||||||
LYCHEE_UPLOADS="__DATADIR__/uploads/"
|
LYCHEE_UPLOADS="__PUBLIC_PATH__/uploads/"
|
||||||
|
|
||||||
# url to access those files
|
# url to access those files
|
||||||
# LYCHEE_DIST_URL="dist/"
|
# LYCHEE_DIST_URL="dist/"
|
||||||
|
|
|
@ -26,7 +26,7 @@ location ^~ __PATH__/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
location __PATH__/uploads/ {
|
location __PATH__/uploads/ {
|
||||||
alias __DATADIR__/uploads/ ;
|
alias __PUBLIC_PATH__/uploads/ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Photo-management-system to manage and share photos",
|
"en": "Photo-management-system to manage and share photos",
|
||||||
"fr": "Système de gestion de photos pour gérer et partager des 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/",
|
"url": "https://lycheeorg.github.io/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -24,7 +24,7 @@ ynh_print_info --message="Loading installation settings..."
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_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)
|
public_path=$(ynh_app_setting_get --app=$app --key=public_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)
|
||||||
|
@ -44,7 +44,7 @@ ynh_backup --src_path="$final_path"
|
||||||
# BACKUP MEDIA FOLDER
|
# BACKUP MEDIA FOLDER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="$datadir" --is_big
|
ynh_backup --src_path="$public_path" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
|
|
|
@ -31,7 +31,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
|
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
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)
|
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
|
|
|
@ -90,15 +90,15 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a data directory..." --weight=1
|
ynh_script_progression --message="Creating a data directory..." --weight=1
|
||||||
|
|
||||||
datadir=/home/yunohost.app/$app
|
public_path=/home/yunohost.app/$app
|
||||||
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
||||||
|
|
||||||
mkdir -p $datadir/uploads
|
mkdir -p $public_path/uploads
|
||||||
mkdir -p $datadir/uploads/{big,import,medium,raw,small,thumb}
|
mkdir -p $public_path/uploads/{big,import,medium,raw,small,thumb}
|
||||||
|
|
||||||
chmod 750 "$datadir"
|
chmod 750 "$public_path"
|
||||||
chmod -R o-rwx "$datadir"
|
chmod -R o-rwx "$public_path"
|
||||||
chown -R $app:www-data "$datadir"
|
chown -R $app:www-data "$public_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
|
@ -18,7 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
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)
|
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ ynh_secure_remove --file="$final_path"
|
||||||
if [ "$YNH_APP_PURGE" == true ]
|
if [ "$YNH_APP_PURGE" == true ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Removing $app data directory..." --weight=2
|
ynh_script_progression --message="Removing $app data directory..." --weight=2
|
||||||
ynh_secure_remove --file="$datadir"
|
ynh_secure_remove --file="$public_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -25,7 +25,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
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)
|
||||||
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_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
@ -74,13 +74,13 @@ chown -R $app:www-data "$final_path"
|
||||||
ynh_script_progression --message="Restoring the data directory..."
|
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.
|
# 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 755 "$public_path"
|
||||||
chmod -R o-rwx "$datadir"
|
chmod -R o-rwx "$public_path"
|
||||||
chown -R $app:www-data "$datadir"
|
chown -R $app:www-data "$public_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
|
|
|
@ -19,7 +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)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
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)
|
||||||
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_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
phpversion=$YNH_PHP_VERSION
|
phpversion=$YNH_PHP_VERSION
|
||||||
|
@ -64,14 +64,23 @@ 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 new datadir doesn't exist, create it
|
# If public_path doesn't exist, create it
|
||||||
|
if [ -z "$public_path" ]; then
|
||||||
|
public_path=/home/yunohost.app/$app
|
||||||
|
mkdir -p $public_path
|
||||||
|
chmod 755 $public_path
|
||||||
|
chown -R $app:www-data $public_path
|
||||||
|
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If new "/home/yunohost.app/$app" doesn't exist, create it
|
||||||
if [ -z "/home/yunohost.app/$app" ]; then
|
if [ -z "/home/yunohost.app/$app" ]; then
|
||||||
datadir=/home/yunohost.app/$app
|
public_path=/home/yunohost.app/$app
|
||||||
mkdir -p $datadir
|
mkdir -p $public_path
|
||||||
chmod 755 $datadir
|
chmod 755 $public_path
|
||||||
chown -R $app:www-data $datadir
|
chown -R $app:www-data $public_path
|
||||||
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
||||||
cp -a "$final_path/public/uploads" "$datadir/uploads"
|
cp -a "$final_path/public/uploads" "$public_path/uploads"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If fpm_footprint doesn't exist, create it
|
# If fpm_footprint doesn't exist, create it
|
||||||
|
@ -156,8 +165,6 @@ ynh_script_progression --message="Setting $app config..."
|
||||||
# Setup application config
|
# Setup application config
|
||||||
#ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
#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(\
|
ynh_replace_string --match_string="\$ffmpeg = FFMpeg::create();" --replace_string="\$ffmpeg = FFMpeg::create(array(\
|
||||||
'ffmpeg.binaries' => '/usr/bin/ffmpeg',\
|
'ffmpeg.binaries' => '/usr/bin/ffmpeg',\
|
||||||
'ffprobe.binaries' => '/usr/bin/ffprobe',\
|
'ffprobe.binaries' => '/usr/bin/ffprobe',\
|
||||||
|
|
Loading…
Add table
Reference in a new issue