mirror of
https://github.com/YunoHost-Apps/pluxml_ynh.git
synced 2024-09-03 20:16:02 +02:00
parent
bc2bff729c
commit
3c96392afe
14 changed files with 153 additions and 227 deletions
33
issue_template.md → .github/ISSUE_TEMPLATE.md
vendored
33
issue_template.md → .github/ISSUE_TEMPLATE.md
vendored
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all.
|
||||
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
|
||||
|
||||
---
|
||||
|
||||
|
@ -8,28 +8,30 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
|||
1. *Read this whole template first.*
|
||||
2. *Determine if you are on the right place:*
|
||||
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
|
||||
- *Otherwise, the issue may be due to pluxml itself. Refer to its documentation or repository for help.*
|
||||
- *If you have a doubt, post here, we will figure it out together.*
|
||||
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
|
||||
- *When in doubt, post here and we will figure it out together.*
|
||||
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
### Describe the bug
|
||||
|
||||
*A clear and concise description of what the bug is.*
|
||||
|
||||
**Versions**
|
||||
### Context
|
||||
|
||||
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
|
||||
- YunoHost version: x.x.x
|
||||
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
|
||||
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes*
|
||||
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
|
||||
- If yes, please explain:
|
||||
- Using, or trying to install package version/branch:
|
||||
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
|
||||
|
||||
**To Reproduce**
|
||||
*Steps to reproduce the behavior.*
|
||||
### Steps to reproduce
|
||||
|
||||
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
||||
```sh
|
||||
sudo yunohost app install pluxml
|
||||
sudo yunohost app install the_app
|
||||
```
|
||||
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
||||
- *If the error occurs in your browser, explain what you did:*
|
||||
|
@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
|||
3. *Scroll down to '...'*
|
||||
4. *See error*
|
||||
|
||||
**Expected behavior**
|
||||
### Expected behavior
|
||||
|
||||
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
|
||||
|
||||
**Logs**
|
||||
*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.*
|
||||
### Logs
|
||||
|
||||
*When an operation fails, YunoHost provides a simple way to share the logs.*
|
||||
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
|
||||
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
|
||||
|
||||
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
|
||||
|
||||
*If applicable and useful, add screenshots to help explain your problem.*
|
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
## Problem
|
||||
|
||||
- *Description of why you made this PR*
|
||||
|
||||
## Solution
|
||||
|
||||
- *And how do you fix that problem*
|
||||
|
||||
## PR Status
|
||||
|
||||
- [ ] Code finished and ready to be reviewed/tested
|
||||
- [ ] The fix/enhancement were manually tested (if applicable)
|
||||
|
||||
## Automatic tests
|
||||
|
||||
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
|
61
README.md
61
README.md
|
@ -1,7 +1,12 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# PluXml for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/pluxml.svg)](https://dash.yunohost.org/appci/app/pluxml) ![](https://ci-apps.yunohost.org/ci/badges/pluxml.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pluxml.maintain.svg)
|
||||
[![Install PluXml with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=pluxml)
|
||||
[![Install PluXml with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pluxml)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
|
@ -9,55 +14,31 @@
|
|||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
PluXml is a content management system (CMS) developed in PHP. The data is stored in XML files. It is therefore not necessary to have the database management system. PluXml is customizable through themes and/or plugins.
|
||||
|
||||
**Shipped version:** 5.8.4
|
||||
Blog or CMS storing data in XML format.
|
||||
|
||||
**Shipped version:** 5.8.7~ynh1
|
||||
|
||||
**Demo:** https://demo.pluxml.org/
|
||||
|
||||
## Screenshots
|
||||
|
||||
![Screenshot_Pluxml](sources/images/screenshot.png)
|
||||
![](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Demo
|
||||
|
||||
* [Official demo](https://demo.pluxml.org/)
|
||||
## Disclaimers / important information
|
||||
|
||||
## Configuration
|
||||
|
||||
The admin panel is in https://domain.tld/path/core/admin
|
||||
|
||||
## Documentation
|
||||
## Documentation and resources
|
||||
|
||||
* Official documentation: https://wiki.pluxml.org/
|
||||
* YunoHost documentation: https://yunohost.org/#/app_pluxml
|
||||
|
||||
## 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/pluxml%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/pluxml/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/pluxml%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/pluxml/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* Any known limitations.
|
||||
|
||||
## Additional information
|
||||
|
||||
* Other information you would add about this application
|
||||
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/pluxml_ynh/issues
|
||||
* App website: https://www.pluxml.org/
|
||||
* Upstream app repository: https://github.com/pluxml/PluXml
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
* Official app website: https://www.pluxml.org/
|
||||
* Official user documentation: https://yunohost.org/#/app_pluxml
|
||||
* Official admin documentation: https://wiki.pluxml.org/
|
||||
* Upstream app code repository: https://github.com/pluxml/PluXml
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_pluxml
|
||||
* Report a bug: https://github.com/YunoHost-Apps/pluxml_ynh/issues
|
||||
|
||||
## Developer info
|
||||
|
||||
|
@ -69,3 +50,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/pluxml_ynh/tree/testi
|
|||
or
|
||||
sudo yunohost app upgrade pluxml -u https://github.com/YunoHost-Apps/pluxml_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
59
README_fr.md
59
README_fr.md
|
@ -1,63 +1,40 @@
|
|||
# PluXml pour YunoHost
|
||||
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/pluxml.svg)](https://dash.yunohost.org/appci/app/pluxml) ![](https://ci-apps.yunohost.org/ci/badges/pluxml.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pluxml.maintain.svg)
|
||||
[![Installer PluXml avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=pluxml)
|
||||
[![Installer PluXml avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pluxml)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *Ce package vous permet d'installer PluXml 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.*
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
|
||||
## Vue d'ensemble
|
||||
PluXml est un système de gestion de contenu développé en PHP. Les données sont stockées dans des fichiers XML. Il n'est donc pas nécessaire de disposer du système de gestion de base de données. PluXml est personnalisable par l'intermédiaire de thèmes et/ou de plugins.
|
||||
|
||||
**Version incluse:** 5.8.4
|
||||
Blog ou CMS stockant des données au format XML.
|
||||
|
||||
**Version incluse :** 5.8.7~ynh1
|
||||
|
||||
**Démo :** https://demo.pluxml.org/
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
![Screenshot_Pluxml](sources/images/screenshot.png)
|
||||
![](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Démo
|
||||
|
||||
* [Official demo](https://demo.pluxml.org/)
|
||||
## Avertissements / informations importantes
|
||||
|
||||
## Configuration
|
||||
|
||||
Le panneau d'administration est accessible via https://domain.tld/path/core/admin
|
||||
|
||||
## Documentation
|
||||
## Documentations et ressources
|
||||
|
||||
* Documentation officielle : https://wiki.pluxml.org/
|
||||
* Documentation YunoHost : https://yunohost.org/#/app_pluxml_fr
|
||||
|
||||
## 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/pluxml%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/pluxml/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/pluxml%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/pluxml/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* Limitations connues.
|
||||
|
||||
## Informations additionnelles
|
||||
|
||||
* Autres informations à ajouter sur cette application
|
||||
|
||||
## Liens
|
||||
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/pluxml_ynh/issues
|
||||
* Site de l'application : https://www.pluxml.org/
|
||||
* Dépôt de l'application principale : https://github.com/pluxml/PluXml
|
||||
* Site web YunoHost : https://yunohost.org/
|
||||
|
||||
---
|
||||
* Site officiel de l'app : https://www.pluxml.org/
|
||||
* Documentation officielle utilisateur : https://yunohost.org/#/app_pluxml
|
||||
* Documentation officielle de l'admin : https://wiki.pluxml.org/
|
||||
* Dépôt de code officiel de l'app : https://github.com/pluxml/PluXml
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_pluxml
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/pluxml_ynh/issues
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
|
@ -69,3 +46,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/pluxml_ynh/tree/testi
|
|||
ou
|
||||
sudo yunohost app upgrade pluxml -u https://github.com/YunoHost-Apps/pluxml_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -1,15 +1,10 @@
|
|||
# See here for more information
|
||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
||||
|
||||
# Move this file from check_process.default to check_process when you have filled it.
|
||||
|
||||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
language="fr"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
is_public=1
|
||||
password="pass"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
@ -23,7 +18,6 @@
|
|||
upgrade=1 from_commit=f618522e430dfcb63e1a5843535cf0da165025f3
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
change_url=1
|
||||
;;; Options
|
||||
Email=
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/pluxml/PluXml/archive/v5.8.4.zip
|
||||
SOURCE_SUM=0c2fe54dfe62aee3d4778898fd1935d7a8410385aaea064fc5850db2f12be725
|
||||
SOURCE_URL=https://github.com/pluxml/PluXml/archive/v5.8.7.zip
|
||||
SOURCE_SUM=ea8056d5061a366221a4e2a835a991235a1435f62a60171bfc5f04c38988c910
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
3
doc/DISCLAIMER.md
Normal file
3
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
## Configuration
|
||||
|
||||
The admin panel is in https://domain.tld/path/core/admin
|
3
doc/DISCLAIMER_fr.md
Normal file
3
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
## Configuration
|
||||
|
||||
Le panneau d'administration est accessible via https://domain.tld/path/core/admin
|
Before Width: | Height: | Size: 763 KiB After Width: | Height: | Size: 763 KiB |
|
@ -6,8 +6,16 @@
|
|||
"en": "Blog or CMS storing data in XML format.",
|
||||
"fr": "Blog ou CMS stockant des données au format XML."
|
||||
},
|
||||
"version": "5.8.4~ynh1",
|
||||
"version": "5.8.7~ynh1",
|
||||
"url": "https://www.pluxml.org/",
|
||||
"upstream": {
|
||||
"license": "GPL-2.0-only",
|
||||
"website": "https://www.pluxml.org/",
|
||||
"demo": "https://demo.pluxml.org/",
|
||||
"admindoc": "https://wiki.pluxml.org/",
|
||||
"userdoc": "https://yunohost.org/#/app_pluxml",
|
||||
"code": "https://github.com/pluxml/PluXml"
|
||||
},
|
||||
"license": "GPL-2.0-only",
|
||||
"maintainer": {
|
||||
"name": "Antoine",
|
||||
|
@ -15,50 +23,34 @@
|
|||
"url": "https://miaou.org"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.0.0"
|
||||
"yunohost": ">= 4.2.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.0-fpm"
|
||||
"php7.3-fpm"
|
||||
],
|
||||
"arguments": {
|
||||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for PluXml",
|
||||
"fr": "Choisissez un nom de domaine pour PluXml"
|
||||
},
|
||||
"example": "example.com"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for PluXml",
|
||||
"fr": "Choisissez un chemin pour PluXml"
|
||||
},
|
||||
"example": "/pluxml",
|
||||
"default": "/pluxml"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Choose an admin user for PluXml",
|
||||
"fr": "Choisissez l'administrateur de PluXml"
|
||||
},
|
||||
"example": "John"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public application?",
|
||||
"fr": "Est-ce une application publique ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "If checked, the app will be public",
|
||||
"fr": "Si cochée, votre application sera publique"
|
||||
|
@ -67,7 +59,7 @@
|
|||
},
|
||||
{
|
||||
"name": "language",
|
||||
"type": "string",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Default language",
|
||||
"fr": "Langue par défaut"
|
||||
|
@ -78,10 +70,6 @@
|
|||
{
|
||||
"name": "password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Choose an admin password for PluXml",
|
||||
"fr": "Choisissez un mot de passe administrateur pour PluXml"
|
||||
},
|
||||
"example": "super_secret_password"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
## Problem
|
||||
- *Description of why you made this PR*
|
||||
|
||||
## Solution
|
||||
- *And how do you fix that problem*
|
||||
|
||||
## PR Status
|
||||
- [ ] Code finished.
|
||||
- [ ] Tested with Package_check.
|
||||
- [ ] Fix or enhancement tested.
|
||||
- [ ] Upgrade from last version tested.
|
||||
- [ ] Can be reviewed and tested.
|
||||
|
||||
## Package_check results
|
||||
---
|
||||
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
|
||||
|
||||
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/pluxml_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/pluxml_ynh%20PR-NUM-%20(USERNAME)/)
|
|
@ -51,9 +51,16 @@ ynh_script_progression --message="Storing installation settings..."
|
|||
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
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -65,6 +72,10 @@ 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"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -73,14 +84,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -98,10 +101,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
ynh_script_progression --message="Setting up application with cURL..."
|
||||
|
||||
# Set right permissions for curl install
|
||||
chown -R $app: $final_path
|
||||
chown -R $app $final_path
|
||||
|
||||
# Set the app as temporarily public for cURL call
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
# Reload NGINX
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
@ -110,33 +113,19 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
ynh_script_progression --message="Finalizing installation..."
|
||||
ynh_local_curl "/install.php" "default_lang=$language" "install=Installer" "name=$admin" "login=$admin" "pwd=$password" "pwd2=$password" "data=1" "email=$admin@$domain" "timezone=Europe/Paris"
|
||||
|
||||
#=================================================
|
||||
# REMOVING NO MORE NEEDED FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing install.php and /update"
|
||||
|
||||
#Removing install.php and /update"
|
||||
ynh_secure_remove --file="${final_path}/install.php"
|
||||
ynh_secure_remove --file="${final_path}/update"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R "$app":"$app" $final_path # modif perso
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..."
|
||||
ynh_script_progression --message="Configuring permissions..."
|
||||
|
||||
# Make app public if necessary or protect it
|
||||
if [ $is_public -eq 0 ]
|
||||
then
|
||||
ynh_permission_update --permission "main" --remove "visitors"
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -51,6 +51,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..."
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
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"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -58,21 +66,9 @@ ynh_script_progression --message="Restoring the app main directory..."
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..."
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring user rights..."
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
@ -81,8 +77,6 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..."
|
|||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
ynh_add_fpm_config #--package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
@ -35,21 +34,19 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# 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
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
fi
|
||||
|
||||
# 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
|
||||
#=================================================
|
||||
|
@ -64,6 +61,14 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# 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"
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -78,6 +83,10 @@ then
|
|||
ynh_setup_source --dest_dir="$final_path"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -86,14 +95,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
|||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# 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
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -109,27 +110,12 @@ ynh_add_fpm_config #--package="$extra_php_dependencies"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up application with cURL..."
|
||||
|
||||
chown -R "$app":"$app" $final_path
|
||||
ynh_local_curl "/update/index.php" "submit=submit"
|
||||
|
||||
#=================================================
|
||||
# REMOVING NO MORE NEEDED FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing install.php and /update"
|
||||
|
||||
#Removing install.php and /update"
|
||||
ynh_secure_remove --file="${final_path}/install.php"
|
||||
ynh_secure_remove --file="${final_path}/update"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app:$app $final_path # modif perso
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue