mirror of
https://github.com/YunoHost-Apps/opensondage_ynh.git
synced 2024-09-03 19:46:28 +02:00
Merge branch 'testing' into new-permissions-system
This commit is contained in:
commit
5901213568
15 changed files with 244 additions and 100 deletions
55
.github/ISSUE_TEMPLATE.md
vendored
Normal file
55
.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
|
||||
|
||||
---
|
||||
|
||||
**How to post a meaningful bug report**
|
||||
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 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
|
||||
|
||||
*A clear and concise description of what the bug is.*
|
||||
|
||||
### 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*
|
||||
- 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`*
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
||||
```sh
|
||||
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:*
|
||||
1. *Go to '...'*
|
||||
2. *Click on '...'*
|
||||
3. *Scroll down to '...'*
|
||||
4. *See error*
|
||||
|
||||
### 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
|
||||
|
||||
*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)
|
15
README.md
15
README.md
|
@ -1,14 +1,16 @@
|
|||
# OpenSondage for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/opensondage)
|
||||
[](https://dash.yunohost.org/appci/app/opensondage)  
|
||||
[](https://install-app.yunohost.org/?app=opensondage)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allow you to install OpenSondage 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.*
|
||||
|
||||
## Overview
|
||||
|
||||
Framadate is an online service for planning an appointment or making a decision quickly and easily. It's a community free/libre software alternative to Doodle.
|
||||
OpenSondage is an online service for planning an appointment or making a decision quickly and easily. It's a community free/libre software alternative to Doodle.
|
||||
|
||||
**Shipped version:** 1.1.10
|
||||
|
||||
|
@ -26,7 +28,7 @@ Framadate is an online service for planning an appointment or making a decision
|
|||
## Documentation
|
||||
|
||||
* Official documentation: https://framagit.org/framasoft/framadate/framadate/wikis/home
|
||||
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
|
||||
* YunoHost documentation: https://yunohost.org/#/app_opensondage
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
|
@ -34,9 +36,8 @@ Framadate is an online service for planning an appointment or making a decision
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/opensondage/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/opensondage/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/opensondage/)
|
||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/opensondage/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -56,10 +57,8 @@ Framadate is an online service for planning an appointment or making a decision
|
|||
|
||||
---
|
||||
|
||||
Developers info
|
||||
----------------
|
||||
## Developers info
|
||||
|
||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
|
70
README_fr.md
Normal file
70
README_fr.md
Normal file
|
@ -0,0 +1,70 @@
|
|||
# OpenSondage pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/opensondage)  
|
||||
[](https://install-app.yunohost.org/?app=opensondage)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer OpenSondage 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.*
|
||||
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
OpenSondage est un service en ligne permettant de planifier un rendez-vous ou de prendre une décision rapidement et facilement. C'est une alternative logicielle libre et communautaire à Doodle.
|
||||
|
||||
**Version incluse :** 1.1.10
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||
|
||||
## Démo
|
||||
|
||||
* [Démo YunoHost](https://demo.yunohost.org/date/)
|
||||
* [Démo officielle](https://framadate.org/)
|
||||
|
||||
## Configuration
|
||||
|
||||
## Documentation
|
||||
|
||||
* Documentation officielle : https://framagit.org/framasoft/framadate/framadate/wikis/home
|
||||
* Documentation YunoHost : https://yunohost.org/#/app_opensondage_fr
|
||||
|
||||
## Caractéristiques spécifiques YunoHost
|
||||
|
||||
#### Support multi-utilisateur
|
||||
|
||||
#### Architectures supportées
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/opensondage/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/opensondage/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* Impossible de configurer le courrier, que ce soit avec smtp ou avec sendmail. Voir https://framagit.org/framasoft/framadate/merge_requests/184
|
||||
* Impossible d'utiliser SSOWAT pour identifier l'utilisateur actuel. Voir https://framagit.org/framasoft/framadate/issues/177
|
||||
|
||||
## Additional information
|
||||
|
||||
* Ce paquet contient une version personnalisée de Framadate (fork d'OpenSondage et Studs), les sources sont ici : https://git.framasoft.org/framasoft/framadate/.
|
||||
|
||||
## Liens
|
||||
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/opensondage_ynh/issues
|
||||
* Site de l'application OpenSondage : https://git.framasoft.org/framasoft/framadate/framadate
|
||||
* Dépôt de l'application principale : https://git.framasoft.org/framasoft/framadate/framadate
|
||||
* Site web YunoHost : https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade opensondage -u https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing --debug
|
||||
```
|
|
@ -1,30 +1,39 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/;
|
||||
# Path to source
|
||||
alias __FINALPATH__/;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param HTTPS on;
|
||||
}
|
||||
rewrite "^__PATH__/([a-zA-Z0-9-]+)$" "__PATH__/studs.php?poll=$1";
|
||||
rewrite "^__PATH__/([a-zA-Z0-9-]+)/action/([a-zA-Z_-]+)/(.+)$" "__PATH__/studs.php?poll=$1&$2=$3";
|
||||
rewrite "^__PATH__/([a-zA-Z0-9-]+)/vote/([a-zA-Z0-9]{16})$" "__PATH__/studs.php?poll=$1&vote=$2";
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
# Admin requires the private poll ID, 24-char long
|
||||
rewrite "^__PATH__/([a-zA-Z0-9-]{24})/admin$" "__PATH__/adminstuds.php?poll=$1";
|
||||
rewrite "^__PATH__/([a-zA-Z0-9-]{24})/admin/vote/([a-zA-Z0-9]{16})$" "__PATH__/adminstuds.php?poll=$1&vote=$2";
|
||||
rewrite "^__PATH__/([a-zA-Z0-9-]{24})/admin/action/([a-zA-Z_-]+)(/(.+))?$" "__PATH__/adminstuds.php?poll=$1&$2=$4";
|
||||
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param HTTPS on;
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
location ~ ^__PATH__/(data|config|\.ht|db_structure\.xml|README) {
|
||||
deny all;
|
||||
deny all;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ group = __USER__
|
|||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
||||
listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
|
@ -431,3 +431,6 @@ chdir = __FINALPATH__
|
|||
|
||||
php_admin_value[upload_max_filesize] = 10G
|
||||
php_admin_value[post_max_size] = 10G
|
||||
|
||||
php_admin_value[session.cookie_httponly] = 1
|
||||
php_admin_value[date.timezone] = __TIMEZONE__
|
||||
|
|
|
@ -3,23 +3,23 @@
|
|||
"id": "opensondage",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "OpenSondage is an online service for planning an appointment or making a decision quickly and easily. No registration is required.",
|
||||
"fr": "OpenSondage sert à faire des sondages sans authentification pour trouver une date de réunion qui convienne à toutes les personnes concernées.",
|
||||
"de": "OpenSondage ist ein Online-Dienst, der Ihnen bei der Absprache von Terminen oder der Entscheidungsfindung hilft."
|
||||
"en": "Service for planning an appointment or making a decision quickly and easily.",
|
||||
"fr": "Service pour planifier un rendez-vous ou prendre une décision rapidement et facilement.",
|
||||
"de": "Service zur schnellen und einfachen Planung eines Termins oder zur Entscheidungsfindung."
|
||||
},
|
||||
"version": "1.1.10~ynh1",
|
||||
"version": "1.1.10~ynh2",
|
||||
"url": "https://git.framasoft.org/framasoft/framadate",
|
||||
"license": "CECILL-B",
|
||||
"maintainer": {
|
||||
"name": "YunoHost Contributors",
|
||||
"email": "apps@yunohost.org"
|
||||
"name": "",
|
||||
"email": ""
|
||||
},
|
||||
"previous_maintainers": [{
|
||||
"name": "ljf",
|
||||
"email": "ljf+opensondage_ynh@grimaud.me"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.7.0"
|
||||
"yunohost": ">= 3.8.1"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
## Problem
|
||||
- *Description of why you made this PR*
|
||||
|
||||
## Solution
|
||||
- *And how you fix that*
|
||||
|
||||
## PR Status
|
||||
- [ ] Code finished.
|
||||
- [ ] Tested with Package_check.
|
||||
- [ ] Fix or enhancement tested.
|
||||
- [ ] Upgrade from last version tested.
|
||||
- [ ] Can be reviewed and tested.
|
||||
|
||||
## Validation
|
||||
---
|
||||
*Minor decision*
|
||||
- **Upgrade previous version** :
|
||||
- [ ] **Code review** :
|
||||
- [ ] **Approval (LGTM)** :
|
||||
- [ ] **Approval (LGTM)** :
|
||||
- **CI succeeded** :
|
||||
[](https://ci-apps-hq.yunohost.org/jenkins/job/opensondage_ynh%20PR-NUM-/)
|
||||
*Please replace '-NUM-' in this link by the PR number.*
|
||||
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
|
|
@ -1,5 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# FUTURE OFFICIAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -19,41 +19,41 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the main app directory..."
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up nginx web server configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up php-fpm configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the MySQL database..."
|
||||
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
|
@ -61,4 +61,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
|
@ -52,7 +53,7 @@ fi
|
|||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating nginx web server configuration..." --weight=2
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
|
@ -83,7 +84,7 @@ fi
|
|||
#=================================================
|
||||
# UPDATE OPENSONDAGE CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring opensondage..."
|
||||
ynh_script_progression --message="Reconfiguring OpenSondage..."
|
||||
|
||||
ynh_replace_string --match_string="const APP_URL = '$old_domain';" --replace_string="const APP_URL = '$new_domain';" --target_file="$final_path/app/inc/config.php"
|
||||
|
||||
|
@ -109,7 +110,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=3
|
||||
|
||||
ynh_install_app_dependencies php-fpdf php-cli php-xml
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
|
@ -79,7 +79,7 @@ ynh_setup_source --dest_dir="$final_path"
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring nginx web server..." --weight=2
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -95,9 +95,9 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring php-fpm..." --weight=2
|
||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
|
@ -105,7 +105,7 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
# CREATE CONFIG.PHP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring opensondage..." --weight=2
|
||||
ynh_script_progression --message="Configuring $app..." --weight=2
|
||||
|
||||
config="$final_path/app/inc/config.php"
|
||||
|
||||
|
@ -121,6 +121,8 @@ ynh_replace_string --match_string="__ADMINMAIL__" --replace_string=$admin_mail -
|
|||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string=$language --target_file="$config"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string=$domain --target_file="$config"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string=$path_url --target_file="$config"
|
||||
timezone="$(cat /etc/timezone)"
|
||||
ynh_replace_string --match_string="__TIMEZONE__" --replace_string=$timezone --target_file="$config"
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$config"
|
||||
|
@ -153,7 +155,7 @@ ynh_script_progression --message="Initializing database..." --weight=2
|
|||
# Install composer
|
||||
ynh_install_composer
|
||||
|
||||
ynh_exec_warn_less php7.0 "$final_path/admin/migration.php"
|
||||
ynh_exec_warn_less php$YNH_PHP_VERSION "$final_path/admin/migration.php"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -195,7 +197,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..." --weight=2
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
|
|||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app main directory..." --weight=2
|
||||
ynh_script_progression --message="Removing $app main directory..." --weight=2
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
@ -49,7 +49,7 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing nginx web server configuration..." --weight=3
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=3
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
ynh_remove_nginx_config
|
||||
|
@ -57,9 +57,9 @@ ynh_remove_nginx_config
|
|||
#=================================================
|
||||
# REMOVE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing php-fpm configuration..." --weight=2
|
||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
||||
|
||||
# Remove the dedicated php-fpm config
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -27,6 +27,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -72,7 +73,7 @@ chown -R $app: "$final_path/"{tpl_c,admin/stdout.log}
|
|||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
|
@ -91,16 +92,16 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./
|
|||
ynh_script_progression --message="Reinstalling dependencies..." --weight=9
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies php-fpdf php-xml
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=3
|
||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=3
|
||||
|
||||
ynh_systemd_action --service_name=php7.0-fpm --action=reload
|
||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -23,6 +23,7 @@ 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)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -128,13 +129,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
|
||||
path_url=$(ynh_normalize_url_path --path_url=$path_url)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -152,7 +146,7 @@ fi
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -162,7 +156,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=7
|
||||
|
||||
ynh_install_app_dependencies php-fpdf php-cli php-xml
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -175,9 +169,9 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=3
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
|
@ -188,7 +182,7 @@ ynh_add_fpm_config
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Reconfiguring opensondage..." --weight=2
|
||||
ynh_script_progression --message="Reconfiguring $app..." --weight=2
|
||||
|
||||
config="$final_path/app/inc/config.php"
|
||||
|
||||
|
@ -208,7 +202,8 @@ then
|
|||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string=$language --target_file="$config"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string=$domain --target_file="$config"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string=$path_url --target_file="$config"
|
||||
|
||||
timezone="$(cat /etc/timezone)"
|
||||
ynh_replace_string --match_string="__TIMEZONE__" --replace_string=$timezone --target_file="$config"
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$config"
|
||||
fi
|
||||
|
@ -258,7 +253,7 @@ chown -R $app: "$final_path/"{tpl_c,admin/stdout.log}
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue