1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpservermon_ynh.git synced 2024-09-03 19:56:40 +02:00

Merge branch 'testing' into add-cpe

This commit is contained in:
Éric Gaspar 2022-08-16 07:44:21 +02:00 committed by GitHub
commit 536df2de58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 66 additions and 44 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# PHP Server Monitor for YunoHost # PHP Server Monitor for YunoHost
[![Integration level](https://dash.yunohost.org/integration/phpservermon.svg)](https://dash.yunohost.org/appci/app/phpservermon) ![](https://ci-apps.yunohost.org/ci/badges/phpservermon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpservermon.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/phpservermon.svg)](https://dash.yunohost.org/appci/app/phpservermon) ![Working status](https://ci-apps.yunohost.org/ci/badges/phpservermon.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/phpservermon.maintain.svg)
[![Install PHP Server Monitor with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=phpservermon) [![Install PHP Server Monitor with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=phpservermon)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -17,13 +17,12 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Script that checks whether your websites and servers are up and running Script that checks whether your websites and servers are up and running
**Shipped version:** 3.5.2~ynh4 **Shipped version:** 3.5.2~ynh6
## Screenshots ## Screenshots
![](./doc/screenshots/screenshot.png) ![Screenshot of PHP Server Monitor](./doc/screenshots/screenshot.png)
## Disclaimers / important information ## Disclaimers / important information
@ -34,22 +33,22 @@ Script that checks whether your websites and servers are up and running
## Documentation and resources ## Documentation and resources
* Official app website: www.phpservermonitor.org * Official app website: <www.phpservermonitor.org>
* Official user documentation: https://yunohost.org/apps * Official admin documentation: <http://docs.phpservermonitor.org/en/latest/>
* Official admin documentation: http://docs.phpservermonitor.org/en/latest/ * Upstream app code repository: <https://github.com/phpservermon/phpservermon/>
* Upstream app code repository: https://github.com/phpservermon/phpservermon/ * YunoHost documentation for this app: <https://yunohost.org/app_phpservermon>
* YunoHost documentation for this app: https://yunohost.org/app_phpservermon * Report a bug: <https://github.com/YunoHost-Apps/phpservermon_ynh/issues>
* Report a bug: https://github.com/YunoHost-Apps/phpservermon_ynh/issues
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug
or or
sudo yunohost app upgrade phpservermon -u https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug sudo yunohost app upgrade phpservermon -u https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
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.
-->
# PHP Server Monitor pour YunoHost # PHP Server Monitor pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/phpservermon.svg)](https://dash.yunohost.org/appci/app/phpservermon) ![](https://ci-apps.yunohost.org/ci/badges/phpservermon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpservermon.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/phpservermon.svg)](https://dash.yunohost.org/appci/app/phpservermon) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/phpservermon.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/phpservermon.maintain.svg)
[![Installer PHP Server Monitor avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=phpservermon) [![Installer PHP Server Monitor avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=phpservermon)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer PHP Server Monitor rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer PHP Server Monitor 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.*
@ -13,13 +17,12 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Application pour vérifier que vos sites web et serveurs fonctionnent Application pour vérifier que vos sites web et serveurs fonctionnent
**Version incluse :** 3.5.2~ynh4 **Version incluse :** 3.5.2~ynh6
## Captures d'écran ## Captures d'écran
![](./doc/screenshots/screenshot.png) ![Capture d'écran de PHP Server Monitor](./doc/screenshots/screenshot.png)
## Avertissements / informations importantes ## Avertissements / informations importantes
@ -30,22 +33,22 @@ Application pour vérifier que vos sites web et serveurs fonctionnent
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : www.phpservermonitor.org * Site officiel de l'app : <www.phpservermonitor.org>
* Documentation officielle utilisateur : https://yunohost.org/apps * Documentation officielle de l'admin : <http://docs.phpservermonitor.org/en/latest/>
* Documentation officielle de l'admin : http://docs.phpservermonitor.org/en/latest/ * Dépôt de code officiel de l'app : <https://github.com/phpservermon/phpservermon/>
* Dépôt de code officiel de l'app : https://github.com/phpservermon/phpservermon/ * Documentation YunoHost pour cette app : <https://yunohost.org/app_phpservermon>
* Documentation YunoHost pour cette app : https://yunohost.org/app_phpservermon * Signaler un bug : <https://github.com/YunoHost-Apps/phpservermon_ynh/issues>
* Signaler un bug : https://github.com/YunoHost-Apps/phpservermon_ynh/issues
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade phpservermon -u https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug sudo yunohost app upgrade phpservermon -u https://github.com/YunoHost-Apps/phpservermon_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps **Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -3,5 +3,3 @@ SOURCE_SUM=8edc850aac341c8f0e9d3c95ba376f374195a3cf143d38c1603e7285aa43cc01
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=2 SOURCE_IN_SUBDIR=2
SOURCE_FILENAME=
SOURCE_EXTRACT=

View file

@ -4,11 +4,6 @@ location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/ ; alias __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.php; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file

View file

@ -6,7 +6,7 @@
"en": "Script that checks whether your websites and servers are up and running", "en": "Script that checks whether your websites and servers are up and running",
"fr": "Application pour vérifier que vos sites web et serveurs fonctionnent" "fr": "Application pour vérifier que vos sites web et serveurs fonctionnent"
}, },
"version": "3.5.2~ynh4", "version": "3.5.2~ynh6",
"url": "www.phpservermonitor.org", "url": "www.phpservermonitor.org",
"upstream": { "upstream": {
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
@ -23,20 +23,19 @@
"url": "" "url": ""
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.2.4" "yunohost": ">= 11.0.9"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx", "nginx",
"php7.3-fpm", "php7.4-fpm",
"mysql" "mysql"
], ],
"arguments": { "arguments": {
"install": [ "install": [
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "example.com"
}, },
{ {
"name": "path", "name": "path",

View file

@ -4,9 +4,9 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
YNH_PHP_VERSION="7.3" YNH_PHP_VERSION="7.4"
extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-xml" pkg_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-xml"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -49,6 +49,13 @@ 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=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -94,7 +101,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================

View file

@ -29,6 +29,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1
# Remove a database if it exists, along with the associated user # Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================

View file

@ -40,8 +40,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1 ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \ test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path " || ynh_die --message="There is already a directory: $final_path "
@ -80,6 +78,14 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE CRON FILE # RESTORE THE CRON FILE
#================================================= #=================================================

View file

@ -57,7 +57,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php" ynh_setup_source --dest_dir="$final_path" --keep="config.php"
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"
@ -72,13 +72,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config
#================================================= #=================================================
# UPDATE THE CRON JOB # UPDATE THE CRON JOB