mirror of
https://github.com/YunoHost-Apps/prettynoemiecms_ynh.git
synced 2024-09-03 20:06:36 +02:00
Fix
This commit is contained in:
parent
a2cbadcc34
commit
f0b6f6137f
9 changed files with 39 additions and 79 deletions
|
@ -1,12 +1,12 @@
|
|||
# PrettyNoemieCMS for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/prettynoemiecms)  
|
||||
[](https://install-app.yunohost.org/?app=prettynoemiecms)
|
||||
[](https://install-app.yunohost.org/?app=prettynoemiecms)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allow you to install PrettyNoemieCMS quickly and simply on a YunoHost server.
|
||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||
If you don't have YunoHost, please see [here](https://yunohost.org/install) to know how to install and enjoy it.*
|
||||
|
||||
## Overview
|
||||
PrettyNoemieCMS offers its users an ergonomic solution, simple and elegant to build in no time responsive windows sites with modern design.
|
||||
|
@ -45,8 +45,8 @@ Can the app be used by multiple users? **No**
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
|
||||
## Links
|
||||
|
||||
|
|
20
README_fr.md
20
README_fr.md
|
@ -1,12 +1,12 @@
|
|||
# PrettyNoemieCMS pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/prettynoemiecms)
|
||||
[](https://install-app.yunohost.org/?app=prettynoemiecms)
|
||||
[](https://install-app.yunohost.org/?app=prettynoemiecms)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer prettynoemiecms 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.*
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/install) pour savoir comment l'installer et en profiter.*
|
||||
|
||||
## Vue d'ensemble
|
||||
CMS offrant à ses utilisateurs une solution ergonomique, simple et élégante pour construire en un rien de temps des sites vitrines responsives au design moderne.
|
||||
|
@ -40,17 +40,13 @@ Comment configurer cette application: via le panneau d'administration à : `votr
|
|||
|
||||
#### Support multi-utilisateurs
|
||||
|
||||
L'authentification LDAP et HTTP est-elle prise en charge? **NON**
|
||||
L'application peut-elle être utilisée par plusieurs utilisateurs? **NON**
|
||||
L'authentification LDAP et HTTP est-elle prise en charge? **Non**
|
||||
L'application peut-elle être utilisée par plusieurs utilisateurs? **Non**
|
||||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/prettynoemiecms/)
|
||||
|
||||
**Plus d'informations sur la page de documentation:**
|
||||
https://yunohost.org/packaging_apps
|
||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/prettynoemiecms/)
|
||||
|
||||
## Liens
|
||||
|
||||
|
@ -61,10 +57,8 @@ https://yunohost.org/packaging_apps
|
|||
|
||||
---
|
||||
|
||||
Informations pour les développeurs
|
||||
----------------
|
||||
# Informations pour les développeurs
|
||||
|
||||
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/prettynoemiecms_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
|
|
|
@ -16,11 +16,7 @@
|
|||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
incorrect_path=1
|
||||
port_already_use=0
|
||||
change_url=1
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
|
|
|
@ -14,50 +14,34 @@
|
|||
"email": "pierre@kayou.io"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.8.1"
|
||||
"yunohost": ">= 4.1.7"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.0-fpm"
|
||||
"php7.3-fpm"
|
||||
],
|
||||
"arguments": {
|
||||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for prettynoemiecms",
|
||||
"fr": "Choisissez un nom de domaine pour prettynoemiecms"
|
||||
},
|
||||
"example": "example.com"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for prettynoemiecms",
|
||||
"fr": "Choisissez un chemin pour prettynoemiecms"
|
||||
},
|
||||
"example": "/prettynoemiecms",
|
||||
"default": "/prettynoemiecms"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Choose an admin user",
|
||||
"fr": "Choisissez l’administrateur"
|
||||
},
|
||||
"example": "johndoe"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public application?",
|
||||
"fr": "Est-ce une application publique ?"
|
||||
},
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
|
@ -73,10 +57,6 @@
|
|||
{
|
||||
"name": "password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Set the administrator password",
|
||||
"fr": "Définissez le mot de passe administrateur"
|
||||
},
|
||||
"help": {
|
||||
"en": "Use the help field to add an information for the admin about this question.",
|
||||
"fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question."
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="php7.0-cli php7.0-common php7.0-intl php7.0-json git"
|
||||
pkg_dependencies="php{YNH_PHP_VERSION}-cli php{YNH_PHP_VERSION}-common php{YNH_PHP_VERSION}-intl php{YNH_PHP_VERSION}-json git"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -29,6 +29,22 @@ 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)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
#=================================================
|
||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||
#=================================================
|
||||
|
|
|
@ -52,7 +52,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
|
||||
#=================================================
|
||||
|
@ -92,7 +91,7 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring php-fpm..." --weight=1
|
||||
ynh_script_progression --message="Configuring PHP-FPM." --weight=1
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config
|
||||
|
@ -123,13 +122,10 @@ chown -R $app: $final_path
|
|||
# SETUP APPLICATION WITH CURL
|
||||
#=================================================
|
||||
|
||||
# Set the app as temporarily public for curl call
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
||||
# Reload SSOwat config
|
||||
yunohost app ssowatconf
|
||||
# Set the app as temporarily public for cURL call
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
# Reload Nginx
|
||||
# Reload NGINX
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
# Installation with curl
|
||||
|
@ -137,7 +133,7 @@ ynh_script_progression --message="Finalizing installation..." --weight=2
|
|||
ynh_local_curl "/signIn" "username=$admin" "password=$password" "repeatPassword=$password"
|
||||
|
||||
# Remove the public access
|
||||
ynh_app_setting_delete --app=$app --key=skipped_uris
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
@ -159,8 +155,6 @@ ynh_script_progression --message="Configuring permissions..." --weight=1
|
|||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
|
|
|
@ -41,7 +41,7 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing nginx web server configuration..." --weight=1
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
ynh_remove_nginx_config
|
||||
|
@ -49,7 +49,7 @@ ynh_remove_nginx_config
|
|||
#=================================================
|
||||
# REMOVE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing php-fpm configuration..." --weight=1
|
||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated php-fpm config
|
||||
ynh_remove_fpm_config
|
||||
|
|
|
@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
|
||||
|
@ -34,15 +33,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# Fix is_public as a boolean value
|
||||
if [ "$is_public" = "Yes" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
||||
is_public=1
|
||||
elif [ "$is_public" = "No" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
||||
is_public=0
|
||||
fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z "$final_path" ]; then
|
||||
final_path=/var/www/$app
|
||||
|
@ -75,18 +65,6 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK THE PATH
|
||||
#=================================================
|
||||
|
||||
# Normalize the URL path syntax
|
||||
# N.B. : this is for app installations before YunoHost 2.7
|
||||
# where this value might be something like /foo/ or foo/
|
||||
# instead of /foo ....
|
||||
# If nobody installed your app before 2.7, then you may
|
||||
# safely remove this line
|
||||
path_url=$(ynh_normalize_url_path --path_url=$path_url)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue