mirror of
https://github.com/YunoHost-Apps/drupal_ynh.git
synced 2024-09-03 18:35:53 +02:00
commit
9536afdef1
18 changed files with 80 additions and 75 deletions
|
@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
## Overview
|
||||
Free and open-source content management framework.
|
||||
|
||||
**Shipped version:** 8.9.15
|
||||
**Shipped version:** 8.9.20
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
|
|||
## Vue d'ensemble
|
||||
Framework de gestion de contenu libre et open-source.
|
||||
|
||||
**Version incluse:** 8.9.15
|
||||
**Version incluse:** 8.9.20
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
language="en"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
is_public=1
|
||||
password="pass"
|
||||
install_profil="minimal"
|
||||
; Checks
|
||||
|
@ -21,6 +21,8 @@
|
|||
upgrade=1 from_commit=08ca36cc16691ed64a11034c810f5adefb21186a
|
||||
# 8.9.7~ynh2
|
||||
upgrade=1 from_commit=69b57e0d7cd862e4e5aef0bfc2bc2634874602c4
|
||||
# 8.9.15~ynh1
|
||||
upgrade=1 from_commit=06baed57a0650ec9a9e4e0f3348298065c1207f2
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -35,3 +37,5 @@ Notification=all
|
|||
name=8.9.7~ynh1
|
||||
; commit=69b57e0d7cd862e4e5aef0bfc2bc2634874602c4
|
||||
name=8.9.7~ynh2
|
||||
; commit=06baed57a0650ec9a9e4e0f3348298065c1207f2
|
||||
name=8.9.15~ynh1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/drupal-composer/drupal-project/archive/ec0f41171516c18357ca4cda9068ee4cdeabaa19.tar.gz
|
||||
SOURCE_SUM=aa94ea1e8a0cc382afb8e9f66b56af02ca7c60817403efc0e7b2a89c3dea09b8
|
||||
SOURCE_URL=https://github.com/drupal-composer/drupal-project/archive/d2e7410c8453ff18462278836c76e56b9a973585.tar.gz
|
||||
SOURCE_SUM=22862785f6d83486f3aca1d748f80e00497074591efec93ad20a694ce60f1ced
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -9,11 +9,6 @@ location __PATH__/ {
|
|||
rewrite ^__PATH__/(.+)$ __PATH__/index.php?q=$1 last;
|
||||
}
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
|
||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||
|
|
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
|||
Free and open-source content management framework.
|
1
doc/DESCRIPTION_fr.md
Normal file
1
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1 @@
|
|||
Framework de gestion de contenu libre et open-source.
|
1
doc/DISCLAIMER.md
Normal file
1
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1 @@
|
|||
* LDAP module can be installed
|
1
doc/DISCLAIMER_fr.md
Normal file
1
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1 @@
|
|||
* Le module d'authentification LDAP peut être installé.
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/screenshot.png
Normal file
BIN
doc/screenshots/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
|
@ -6,14 +6,20 @@
|
|||
"en": "A content management framework written in PHP",
|
||||
"fr": "Un système de gestion de contenu écrit en PHP"
|
||||
},
|
||||
"version": "8.9.15~ynh1",
|
||||
"version": "8.9.20~ynh1",
|
||||
"url": "https://www.drupal.org",
|
||||
"upstream": {
|
||||
"license": "GPL-2.0-or-later",
|
||||
"website": "https://www.drupal.org",
|
||||
"admindoc": "https://www.drupal.org/docs/8",
|
||||
"code": "https://github.com/drupal-composer/drupal-project"
|
||||
},
|
||||
"license": "GPL-2.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "yalh76"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.0"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -25,8 +31,7 @@
|
|||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "example.com"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
|
@ -36,8 +41,7 @@
|
|||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"example": "johndoe"
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -55,7 +55,7 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP A CRON FILE
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/cron.d/$app"
|
||||
|
|
|
@ -72,7 +72,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
|
@ -157,7 +157,7 @@ chown -R $app:www-data "$final_path"
|
|||
update-alternatives --set php /usr/bin/php$phpversion
|
||||
|
||||
pushd "$final_path"
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush site:install $install_profil --account-name=$admin --account-pass=$password --account-mail=$admin_mail --db-url=mysql://$db_user:$db_pwd@localhost/$db_name --site-name="$app" --locale=$language --yes
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush site:install $install_profil --account-name=$admin --account-pass=$password --account-mail=$admin_mail --db-url=mysql://$db_user:$db_pwd@localhost/$db_name --site-name="$app" --locale=$language --yes
|
||||
popd
|
||||
|
||||
update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
|
||||
|
|
|
@ -32,14 +32,6 @@ ynh_script_progression --message="Removing the MySQL database..."
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..."
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -64,8 +56,24 @@ ynh_script_progression --message="Removing PHP-FPM configuration..."
|
|||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..."
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing various files..."
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# REMOVE SWAP
|
||||
#=================================================
|
||||
|
@ -73,14 +81,6 @@ ynh_script_progression --message="Removing swap..."
|
|||
|
||||
ynh_del_swap
|
||||
|
||||
#=================================================
|
||||
# REMOVE THE CRON FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the cron file..."
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -37,8 +37,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
|
@ -57,7 +55,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_script_progression --message="Recreating the dedicated system user..."
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
|
@ -73,7 +71,7 @@ chown -R $app:www-data "$final_path"
|
|||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring PHP-FPM configuration..."
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
|
||||
|
||||
# Restore the file first, so it can have a backup if different
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
@ -84,20 +82,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# RESTORE THE CRON FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the cron file..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# ADD SWAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding swap..."
|
||||
|
||||
ynh_add_swap --size=$swap_needed
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -115,6 +99,20 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring various files..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# ADD SWAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding swap..."
|
||||
|
||||
ynh_add_swap --size=$swap_needed
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -32,18 +32,6 @@ ynh_script_progression --message="Checking version..."
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
@ -60,13 +48,25 @@ ynh_abort_if_errors
|
|||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -137,12 +137,12 @@ chown -R $app:www-data "$final_path"
|
|||
update-alternatives --set php /usr/bin/php$phpversion
|
||||
|
||||
pushd "$final_path"
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 1 --input-format=integer
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH php composer.phar update drupal/core webflo/drupal-core-require-dev --with-dependencies
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH php composer.phar update --with-dependencies
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod -y updatedb
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod cache:rebuild
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 0 --input-format=integer
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 1 --input-format=integer
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH php composer.phar update drupal/core webflo/drupal-core-require-dev --with-dependencies
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH php composer.phar update --with-dependencies
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod -y updatedb
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod cache:rebuild
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 0 --input-format=integer
|
||||
popd
|
||||
|
||||
update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
|
||||
|
|
Loading…
Add table
Reference in a new issue