diff --git a/README.md b/README.md index 83ec260..08f26cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # Lychee for YunoHost [![Integration level](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) @@ -5,59 +10,29 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Lychee quickly and simply on a YunoHost server. +> *This package allows you to install Lychee quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Shipped version:** 4.3 +Photo-management-system to manage and share photos. + +**Shipped version:** 4.3.4~ynh1 + +**Demo:** https://lycheeorg.github.io/demo/ ## Screenshots -![](https://camo.githubusercontent.com/b9010f02c634219795950e034f511f4cf4af5c60/68747470733a2f2f732e656c6563746572696f75732e636f6d2f696d616765732f6c79636865652f312e6a706567) +![](./doc/screenshots/screenshot.jpg) -## Demo +## Documentation and resources -* [Official demo](https://lycheeorg.github.io/demo/) - -## Configuration - -How to configure this app: From an admin panel. - -## Documentation - - * Official documentation: https://lycheeorg.github.io/docs/ - * YunoHost documentation: https://yunohost.org/en/app_lychee - -## YunoHost specific features - -#### Multi-user support - - * Are LDAP and HTTP auth supported? **No** - * Can the app be used by multiple users? **Yes** - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lychee.svg)](https://ci-apps.yunohost.org/ci/apps/lychee/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lychee.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lychee/) - -## Limitations - -* Any known limitations. - -## Additional information - -* Other info you would like to add about this app. - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/lychee_ynh/issues - * App website: https://lycheeorg.github.io/ - * Upstream app repository: https://github.com/LycheeOrg/Lychee - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://lycheeorg.github.io/ +* Official user documentation: https://yunohost.org/en/app_lychee +* Official admin documentation: https://lycheeorg.github.io/docs/ +* Upstream app code repository: https://github.com/LycheeOrg/Lychee +* YunoHost documentation for this app: https://yunohost.org/app_lychee +* Report a bug: https://github.com/YunoHost-Apps/lychee_ynh/issues ## Developer info @@ -69,3 +44,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/lychee_ynh/tree/testi or sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 3ec9d46..d21012d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,63 +1,34 @@ # Lychee pour YunoHost -[![Integration level](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/lychee.svg)](https://dash.yunohost.org/appci/app/lychee) ![](https://ci-apps.yunohost.org/ci/badges/lychee.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lychee.maintain.svg) [![Installer Lychee avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lychee) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Lychee rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer Lychee rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -Lychee est un outil de gestion de photos gratuit, qui fonctionne sur votre serveur ou votre espace Web. L'installation est une question de secondes. Téléchargez, gérez et partagez des photos comme à partir d'une application native. Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 4.3 +Système de gestion de photos pour gérer et partager des photos. + +**Version incluse :** 4.3.4~ynh1 + +**Démo :** https://lycheeorg.github.io/demo/ ## Captures d'écran -![](https://camo.githubusercontent.com/b9010f02c634219795950e034f511f4cf4af5c60/68747470733a2f2f732e656c6563746572696f75732e636f6d2f696d616765732f6c79636865652f312e6a706567) +![](./doc/screenshots/screenshot.jpg) -## Démo +## Documentations et ressources -* [Démo officielle](https://lycheeorg.github.io/demo/) - -## Configuration - -Comment configurer cette application : via le panneau d'administration. - -## Documentation - - * Documentation officielle : https://lycheeorg.github.io/docs/ - * Documentation YunoHost : https://yunohost.org/fr/app_lychee - -## Caractéristiques spécifiques YunoHost - -#### Support multi-utilisateur - -* L'authentification LDAP et HTTP est-elle prise en charge ? **Non** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** - -#### Architectures supportées - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lychee.svg)](https://ci-apps.yunohost.org/ci/apps/lychee/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lychee.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lychee/) - -## Limitations - -* Limitations connues. - -## Informations additionnelles - -* Autres informations que vous souhaitez ajouter sur cette application. - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/lychee_ynh/issues - * Site de l'application : https://lycheeorg.github.io/ - * Dépôt de l'application principale : https://github.com/LycheeOrg/Lychee - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://lycheeorg.github.io/ +* Documentation officielle utilisateur : https://yunohost.org/en/app_lychee +* Documentation officielle de l'admin : https://lycheeorg.github.io/docs/ +* Dépôt de code officiel de l'app : https://github.com/LycheeOrg/Lychee +* Documentation YunoHost pour cette app : https://yunohost.org/app_lychee +* Signaler un bug : https://github.com/YunoHost-Apps/lychee_ynh/issues ## Informations pour les développeurs @@ -66,6 +37,8 @@ Merci de faire vos pull request sur la [branche testing](https://github.com/Yuno Pour essayer la branche testing, procédez comme suit. ``` sudo yunohost app install https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug -or +ou sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index 7614fc0..6d7e474 100644 --- a/check_process +++ b/check_process @@ -12,6 +12,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=2a2fd5b9a9e81ff8e157cf1747418fd11f4211a2 + upgrade=1 from_commit=1fa062d50aaa810deeba6426405fbe2e2671492a backup_restore=1 multi_instance=1 change_url=1 @@ -21,5 +22,6 @@ Notification=none ;;; Upgrade options ; commit=2a2fd5b9a9e81ff8e157cf1747418fd11f4211a2 name= Fix linter (#13) 11 Dec 2020 + ; commit=1fa062d50aaa810deeba6426405fbe2e2671492a + name= Merge branch 'testing' (#26) manifest_arg=domain=DOMAIN&path=PATH&is_public=1& - diff --git a/conf/app.src b/conf/app.src index 7c85370..1b1704c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/LycheeOrg/Lychee/releases/download/v4.3.0/Lychee.zip -SOURCE_SUM=4d9afdafb3d6711e85779377ebde523d7ef0a5bf3aea6ff7ca29ef6058536184 +SOURCE_URL=https://github.com/LycheeOrg/Lychee/releases/download/v4.3.4/Lychee.zip +SOURCE_SUM=6f51e8239bc38cba0ae8f0759b7eb4c87a09009cab07b3694f4666f7411b0f8d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/ffprobe.patch b/conf/ffprobe.patch new file mode 100644 index 0000000..c5d298e --- /dev/null +++ b/conf/ffprobe.patch @@ -0,0 +1,13 @@ +diff --git a/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php b/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php +index 9ececfe..106eadd 100644 +--- a/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php ++++ b/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php +@@ -33,7 +33,7 @@ class FFprobe extends AdapterAbstract + * + * @var string + */ +- protected $toolPath; ++ protected $toolPath = '/usr/bin/ffprobe'; + + /** + * @var string-e diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot.jpg b/doc/screenshots/screenshot.jpg new file mode 100644 index 0000000..bfc7481 Binary files /dev/null and b/doc/screenshots/screenshot.jpg differ diff --git a/manifest.json b/manifest.json index 9ce297d..9d06b3e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,8 +6,16 @@ "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.3~ynh1", + "version": "4.3.4~ynh1", "url": "https://lycheeorg.github.io/", + "upstream": { + "license": "MIT", + "website": "https://lycheeorg.github.io/", + "demo": "https://lycheeorg.github.io/demo/", + "admindoc": "https://lycheeorg.github.io/docs/", + "userdoc": "https://yunohost.org/en/app_lychee", + "code": "https://github.com/LycheeOrg/Lychee" + }, "license": "MIT", "maintainer": { "name": "eric_G", diff --git a/scripts/_common.sh b/scripts/_common.sh index 02a192e..2d29ec5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,12 +7,19 @@ YNH_PHP_VERSION="7.4" # Composer version -YNH_COMPOSER_VERSION="2.0.13" +YNH_COMPOSER_VERSION="2.1.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip" +extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-intl" -# needed for raw upload and video playback -pkg_dependencies="ufraw-batch ffmpeg" +pkg_dependencies="ffmpeg" + +# # needed for raw upload and video playback +# # ufraw-batch is not supported in bullseye +# if ! (apt-cache -q=0 show ufraw-batch |& grep ': No packages found' &>/dev/null); then +# pkg_dependencies="ffmpeg" +# else +# pkg_dependencies="ufraw-batch ffmpeg" +# fi #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 7645bce..f57412d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Backing up Lychee..." +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -71,4 +71,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for Lychee. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index d88a31b..f76a1eb 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -106,4 +106,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for Lychee" --last +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index 48fd622..6e55c2f 100755 --- a/scripts/install +++ b/scripts/install @@ -51,23 +51,23 @@ ynh_script_progression --message="Installing dependencies..." --weight=3 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE A MYSQL DATABASE -#================================================= -ynh_script_progression --message="Creating a MySQL database..." - -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name - #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Configuring system user..." --weight=2 # Create a system user -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" + +#================================================= +# CREATE A MYSQL DATABASE +#================================================= +ynh_script_progression --message="Creating a MySQL database..." --weight=2 + +db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name +ynh_app_setting_set --app=$app --key=db_name --value=$db_name +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -76,11 +76,17 @@ ynh_script_progression --message="Setting up source files..." --weight=3 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir=$final_path +ynh_setup_source --dest_dir="$final_path" + +chmod 750 "$final_path" +chmod 750 "$final_path/bootstrap/cache" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= -# CREATE DIRECTORIES +# CREATE DATA DIRECTORY #================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 public_path=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=public_path --value=$public_path @@ -88,13 +94,17 @@ ynh_app_setting_set --app=$app --key=public_path --value=$public_path mkdir -p $public_path/uploads mkdir -p $public_path/uploads/{big,import,medium,raw,small,thumb} +chmod 750 "$public_path" +chmod -R o-rwx "$public_path" +chown -R $app:www-data "$public_path" + #================================================= # NGINX CONFIGURATION #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config -ynh_add_nginx_config #"public_path" +ynh_add_nginx_config #================================================= # PHP-FPM CONFIGURATION @@ -108,42 +118,34 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # INSTALL LYCHEE WITH COMPOSER #================================================= -ynh_script_progression --message="Installing Lychee with Composer..." --weight=15 +ynh_script_progression --message="Installing $app with Composer..." --weight=15 ynh_install_composer --install_args="--ignore-platform-reqs" #================================================= # BUILDING #================================================= -ynh_script_progression --message="Building..." +ynh_script_progression --message="Building..." --weight=10 # Setup application config ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env" - + # Setup application config pushd $final_path php$phpversion artisan key:generate -n --force --env php$phpversion artisan migrate -n --force php$phpversion artisan config:clear -n php$phpversion artisan config:cache -n + patch -p1 < "$YNH_CWD/../conf/ffprobe.patch" popd # Setup custom user.css file ynh_add_config --template="../conf/user.css.example" --destination="$final_path/public/dist/user.css" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files - -chmod 750 "$final_path" -chmod 750 "$final_path/bootstrap/cache" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - -chown -R $app: $public_path -chmod 755 $public_path +ynh_replace_string --match_string="\$ffmpeg = FFMpeg::create();" --replace_string="\$ffmpeg = FFMpeg::create(array(\ + 'ffmpeg.binaries' => '/usr/bin/ffmpeg',\ + 'ffprobe.binaries' => '/usr/bin/ffprobe',\ +));" --target_file="$final_path/app/Actions/Photo/Extensions/VideoEditing.php" #================================================= # SETUP SSOWAT @@ -167,4 +169,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Lychee completed" --last +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 4a66c7f..c6c1d45 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,7 +27,7 @@ db_user=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing Lychee main directory..." --weight=3 +ynh_script_progression --message="Removing app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -78,4 +78,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Lychee completed" --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index 30bd6b5..51a327f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -48,41 +48,37 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= -ynh_script_progression --message="Restoring Lychee main directory..." --weight=2 - -ynh_restore_file --origin_path="$final_path" - #================================================= # RECREATE THE DEDICATED USER #================================================= ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= -# RESTORE DATA +# RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring Lychee data..." +ynh_script_progression --message="Restoring the app main directory..." --weight=2 -# 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="$public_path" --not_mandatory +ynh_restore_file --origin_path="$final_path" -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Set permissions to app files chmod 750 "$final_path" chmod 750 "$final_path/bootstrap/cache" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -chown -R $app: $public_path -chmod 755 $public_path +#================================================= +# RESTORE DATA +#================================================= +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="$public_path" --not_mandatory + +chmod 755 "$public_path" +chmod -R o-rwx "$public_path" +chown -R $app:www-data "$public_path" #================================================= # REINSTALL DEPENDENCIES @@ -126,4 +122,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Lychee" --last +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 6ef357d..abe95fa 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,6 @@ 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) phpversion=$YNH_PHP_VERSION -version=ynh_app_upstream_version #================================================= # CHECK VERSION @@ -62,10 +61,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi -# If public_path doesn't exist, create it -if [ -z "$public_path" ]; then +# If new public_path doesn't exist, create it +if [ -z "/home/yunohost.app/$app" ]; 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 cp -a "$final_path/public/uploads" "$public_path/uploads" fi @@ -102,10 +103,11 @@ then ynh_script_progression --message="Upgrading source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/public/dist/user.css $final_path/.env" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/public/dist/user.css" fi chmod 750 "$final_path" +chmod 750 "$final_path/bootstrap/cache" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -142,35 +144,31 @@ ynh_install_composer --install_args="--ignore-platform-reqs" #================================================= # SETUP APPLICATION CONFIG #================================================= -# ynh_script_progression --message="Setting Lychee config..." +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',\ +));" --target_file="$final_path/app/Actions/Photo/Extensions/VideoEditing.php" + #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= -ynh_script_progression --message="Upgrading Lychee source files..." --weight=4 +ynh_script_progression --message="Upgrading $app source files..." --weight=4 -# pushd $final_path -# php$phpversion artisan key:generate -n --force --env -# php$phpversion artisan migrate -n --force -# php$phpversion artisan config:clear -n -# php$phpversion artisan config:cache -n -# popd +ynh_exec_warn_less ynh_composer_exec --commands=dump-autoload -ynh_exec_warn_less ynh_composer_exec --commands=\"dump-autoload\" - -( cd $final_path && php$phpversion artisan migrate -n --force ) -( cd $final_path && php$phpversion artisan config:clear -n ) -( cd $final_path && php$phpversion artisan config:cache -n ) - -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -chown -R $app: $public_path -chmod 755 $public_path +pushd $final_path + #php$phpversion artisan key:generate + php$phpversion artisan migrate -n --force + php$phpversion artisan config:clear -n + php$phpversion artisan config:cache -n +popd #================================================= # RELOAD NGINX @@ -183,4 +181,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Lychee completed" --last +ynh_script_progression --message="Upgrade of $app completed" --last