mirror of
https://github.com/YunoHost-Apps/drupal7_ynh.git
synced 2024-09-03 18:26:19 +02:00
Apply last example_ynh
This commit is contained in:
parent
1cd86f016d
commit
9b0b7586ab
17 changed files with 72 additions and 101 deletions
30
README.md
30
README.md
|
@ -11,15 +11,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
## Overview
|
||||
Free and open-source content management framework.
|
||||
|
||||
**Shipped version:** 7.80
|
||||
|
||||
## Screenshots
|
||||
|
||||
![](https://www.drupal.org/files/issues/D7-screenshot.png)
|
||||
|
||||
## Documentation
|
||||
|
||||
* Official documentation: https://www.drupal.org/docs/7
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
|
@ -27,26 +20,3 @@ Free and open-source content management framework.
|
|||
|
||||
LDAP module can be installed
|
||||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/drupal7.svg)](https://ci-apps.yunohost.org/ci/apps/drupal7/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/drupal7.svg)](https://ci-apps-arm.yunohost.org/ci/apps/drupal7/)
|
||||
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/drupal7_ynh/issues
|
||||
* App website: https://www.drupal.org
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/drupal7_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/drupal7_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade drupal7 -u https://github.com/YunoHost-Apps/drupal7_ynh/tree/testing --debug
|
||||
```
|
||||
|
|
|
@ -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:** 7.80
|
||||
**Version incluse:** 7.84
|
||||
|
||||
## 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
|
||||
|
|
|
@ -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: 247 KiB |
|
@ -6,14 +6,19 @@
|
|||
"en": "Old version of a content management framework written in PHP",
|
||||
"fr": "Ancienne version d'un système de gestion de contenu écrit en PHP"
|
||||
},
|
||||
"version": "7.80~ynh2",
|
||||
"version": "7.84~ynh1",
|
||||
"url": "https://www.drupal.org",
|
||||
"upstream": {
|
||||
"license": "GPL-2.0-or-later",
|
||||
"website": "https://www.drupal.org",
|
||||
"userdoc": "https://www.drupal.org/docs/7"
|
||||
},
|
||||
"license": "GPL-2.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "yalh76"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.0"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -25,8 +30,7 @@
|
|||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "example.com"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
|
@ -36,8 +40,7 @@
|
|||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"example": "johndoe"
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -58,7 +58,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"
|
||||
|
|
|
@ -71,7 +71,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
|
||||
|
@ -148,21 +148,21 @@ 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 pm-download -y drupal-7 --drupal-project-rename=$app
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush pm-download -y drupal-7 --drupal-project-rename=$app
|
||||
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app 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 sudo -u $app env PATH=$PATH drush @$app pm-download drush_language
|
||||
#ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-download ldap
|
||||
#ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-enable -y ldap_servers ldap_user ldap_authentication ldap_authorization ldap_authorization_drupal_role
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-download l10n_update
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-enable -y l10n_update
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app language-add $language
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app language-default $language
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app cache-clear drush
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update-refresh
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-update
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app core-cron
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app 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 @$app pm-download drush_language
|
||||
#ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-download ldap
|
||||
#ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-enable -y ldap_servers ldap_user ldap_authentication ldap_authorization ldap_authorization_drupal_role
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-download l10n_update
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-enable -y l10n_update
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app language-add $language
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app language-default $language
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app cache-clear drush
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update-refresh
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-update
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app core-cron
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
|
|
|
@ -31,14 +31,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
|
||||
#=================================================
|
||||
|
@ -63,12 +55,20 @@ 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 THE CRON FILE
|
||||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the cron file..."
|
||||
ynh_script_progression --message="Removing various files..."
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
|
|
@ -39,8 +39,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 "
|
||||
|
||||
|
@ -59,7 +57,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
|
||||
|
@ -86,12 +84,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# RESTORE THE CRON FILE
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -109,6 +101,13 @@ 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"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -31,18 +31,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
|
||||
#=================================================
|
||||
|
@ -59,13 +47,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
|
||||
|
@ -136,14 +136,14 @@ 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 variable-set --exact maintenance_mode 1
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app cache-clear all
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-update -y drupal
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app cache-clear all
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update-refresh
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-update -y drupal
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update-refresh
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update
|
||||
|
||||
ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
|
|
Loading…
Reference in a new issue