From ae83deccee03a823f3b4013d3a9d9d8cc5a15296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:02:40 +0200 Subject: [PATCH 01/12] v2 --- conf/nginx.conf | 2 +- manifest.toml | 51 ++++++++++++++++++++++++++++++++++++++++++++++ scripts/_common.sh | 2 +- scripts/backup | 14 ++++++------- scripts/install | 44 +++++++++++++++++++-------------------- scripts/remove | 16 +++++++-------- scripts/restore | 32 ++++++++++++++--------------- scripts/upgrade | 40 ++++++++++++++++++------------------ 8 files changed, 126 insertions(+), 75 deletions(-) create mode 100644 manifest.toml diff --git a/conf/nginx.conf b/conf/nginx.conf index d9fdc4e..319eef1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/; + alias __INSTALL_DIR__/; index index.php; diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..cd6b0b3 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,51 @@ +packaging_format = 2 + +id = "phpinfo" +name = "Phpinfo" +description.en = "Simple phpinfo" +description.fr = "Simple phpinfo" + +version = "1.0~ynh4" + +maintainers = ["Maniack Crudelis"] + +[upstream] +license = "GPL-3.0-or-later" +website = "https://www.php.net/manual/fr/function.phpinfo.php" +cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 11.0.9" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +multi_instance = true +ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. +sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "domain" + + [install.path] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "path" + default = "/phpinfo" + + [install.phpversion] + ask.en = "Choose the version of PHP to use." + ask.fr = "Choisissez la version de PHP à utiliser." + type = "string" + choices = ["7.3", "7.4", "8.0", "8.1"] + default = "7.4" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index 41a5e67..5fea844 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION=7.4 +#REMOVEME? YNH_PHP_VERSION=7.4 #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 0853e2c..076ccc7 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,18 +15,18 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? 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) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -37,7 +37,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/install b/scripts/install index dd42dd8..ae4642e 100755 --- a/scripts/install +++ b/scripts/install @@ -14,45 +14,45 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -phpversion=$YNH_APP_ARG_PHPVERSION +#REMOVEME? domain=$YNH_APP_ARG_DOMAIN +#REMOVEME? path=$YNH_APP_ARG_PATH +#REMOVEME? phpversion=$YNH_APP_ARG_PHPVERSION -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +#REMOVEME? install_dir=/var/www/$app +#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" # Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +#REMOVEME? 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 +#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." +#REMOVEME? ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # STANDARD MODIFICATIONS @@ -61,14 +61,14 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= ynh_script_progression --message="Setting up source files..." -ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir -mkdir -p $final_path -cp ../sources/index.php /$final_path/. +mkdir -p $install_dir +cp ../sources/index.php /$install_dir/. -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION @@ -89,9 +89,9 @@ ynh_add_nginx_config #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 41a0c64..3a51979 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,22 +12,22 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # STANDARD REMOVE #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." +#REMOVEME? ynh_script_progression --message="Removing app main directory..." # Remove the app directory securely -ynh_secure_remove --file="$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" #================================================= # REMOVE NGINX CONFIGURATION @@ -50,10 +50,10 @@ ynh_remove_fpm_config #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 65db0a1..7760e1d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,48 +15,48 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -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) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir \ + || ynh_die --message="There is already a directory: $install_dir " #================================================= # STANDARD RESTORATION STEPS #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." +#REMOVEME? 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" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 6ead8aa..3e73fa8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,14 +12,14 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -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) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -31,26 +31,26 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +#REMOVEME? 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" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -60,13 +60,13 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." - mkdir -p $final_path - cp -f ../sources/index.php /$final_path/. + mkdir -p $install_dir + cp -f ../sources/index.php /$install_dir/. fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION @@ -87,9 +87,9 @@ ynh_add_nginx_config #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT From 173ef648a9150db6978d4976f5b4b10e34efa193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:13:40 +0200 Subject: [PATCH 02/12] v2 --- check_process | 37 --------------------------- conf/extra_php-fpm.conf | 4 +++ doc/DISCLAIMER.md | 0 manifest.json | 52 -------------------------------------- manifest.toml | 27 ++++++++++---------- scripts/_common.sh | 2 -- scripts/backup | 18 -------------- scripts/install | 55 ----------------------------------------- scripts/remove | 30 ---------------------- scripts/restore | 38 ---------------------------- scripts/upgrade | 45 --------------------------------- tests.toml | 33 +++++++++++++++++++++++++ 12 files changed, 51 insertions(+), 290 deletions(-) delete mode 100644 check_process create mode 100644 conf/extra_php-fpm.conf delete mode 100644 doc/DISCLAIMER.md delete mode 100644 manifest.json create mode 100644 tests.toml diff --git a/check_process b/check_process deleted file mode 100644 index 77138eb..0000000 --- a/check_process +++ /dev/null @@ -1,37 +0,0 @@ -;; Test complet avec php 7.3 - ; Manifest - domain="domain.tld" - path="/path" - phpversion="7.4" - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=0 - setup_nourl=0 - setup_private=0 - setup_public=0 - upgrade=1 - backup_restore=1 - multi_instance=1 - incorrect_path=0 - port_already_use=0 - change_url=0 -;; Test avec php 7.4 - ; Manifest - domain="domain.tld" - path="/path" - phpversion="7.4" - ; Checks - setup_sub_dir=1 - backup_restore=1 -;; Test avec php 8.0 - ; Manifest - domain="domain.tld" - path="/path" - phpversion="8.0" - ; Checks - setup_sub_dir=1 - backup_restore=1 -;;; Options -Email= -Notification=none diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..700c37c --- /dev/null +++ b/conf/extra_php-fpm.conf @@ -0,0 +1,4 @@ +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index e69de29..0000000 diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 96f039b..0000000 --- a/manifest.json +++ /dev/null @@ -1,52 +0,0 @@ - { - "name": "Phpinfo", - "id": "phpinfo", - "packaging_format": 1, - "description": { - "en": "Simple phpinfo", - "fr": "Simple phpinfo" - }, - "version": "1.0~ynh4", - "url": "https://www.php.net/manual/fr/function.phpinfo.php", - "upstream": { - "license": "GPL-3.0-or-later", - "website": "https://www.php.net/manual/fr/function.phpinfo.php" - }, - "license": "GPL-3.0-or-later", - "maintainer": { - "name": "Maniack Crudelis", - "email": "maniackc_dev@crudelis.fr" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": true, - "services": [ - "nginx", - "php7.4-fpm" - ], - "arguments": { - "install" : [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/phpinfo", - "default": "/phpinfo" - }, - { - "name": "phpversion", - "type": "string", - "ask": { - "en": "Choose the version of PHP to use.", - "fr": "Choisissez la version de PHP à utiliser." - }, - "choices": ["7.3", "7.4", "8.0", "8.1"], - "default": "7.4" - } - ] - } -} diff --git a/manifest.toml b/manifest.toml index cd6b0b3..0f7ff7e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -12,26 +12,22 @@ maintainers = ["Maniack Crudelis"] [upstream] license = "GPL-3.0-or-later" website = "https://www.php.net/manual/fr/function.phpinfo.php" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] -yunohost = ">= 11.0.9" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +yunohost = ">= 11.1.16" +architectures = "all" multi_instance = true -ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. -sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = false +sso = false +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" [install.path] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "path" default = "/phpinfo" @@ -39,8 +35,8 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen ask.en = "Choose the version of PHP to use." ask.fr = "Choisissez la version de PHP à utiliser." type = "string" - choices = ["7.3", "7.4", "8.0", "8.1"] - default = "7.4" + choices = ["7.4", "8.0", "8.1", "8.2"] + default = "8.0" [resources] [resources.system_user] @@ -49,3 +45,8 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.permissions] main.url = "/" + + [resources.apt] + packages_from_raw_bash = """ + echo "php${phpversion}-fpm" + """ diff --git a/scripts/_common.sh b/scripts/_common.sh index 5fea844..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,6 @@ # COMMON VARIABLES #================================================= -#REMOVEME? YNH_PHP_VERSION=7.4 - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 076ccc7..6854aaa 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,24 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= diff --git a/scripts/install b/scripts/install index ae4642e..1c78ff1 100755 --- a/scripts/install +++ b/scripts/install @@ -9,51 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -#REMOVEME? domain=$YNH_APP_ARG_DOMAIN -#REMOVEME? path=$YNH_APP_ARG_PATH -#REMOVEME? phpversion=$YNH_APP_ARG_PHPVERSION - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." - -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -#REMOVEME? ynh_script_progression --message="Storing installation settings..." - -#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path -ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -61,12 +16,9 @@ ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion #================================================= ynh_script_progression --message="Setting up source files..." -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir - mkdir -p $install_dir cp ../sources/index.php /$install_dir/. -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -86,13 +38,6 @@ ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 3a51979..c9f5356 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,26 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE APP MAIN DIR -#================================================= -#REMOVEME? ynh_script_progression --message="Removing app main directory..." - -# Remove the app directory securely -#REMOVEME? ynh_secure_remove --file="$install_dir" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -45,16 +25,6 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 7760e1d..08cbd68 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,43 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." - -#REMOVEME? test ! -d $install_dir \ - || ynh_die --message="There is already a directory: $install_dir " - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -54,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 3e73fa8..fbdedec 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,49 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -64,7 +27,6 @@ then cp -f ../sources/index.php /$install_dir/. fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -84,13 +46,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..64a6787 --- /dev/null +++ b/tests.toml @@ -0,0 +1,33 @@ +test_format = 1.0 + +[default] + + # ------------ + # Tests to run + # ------------ + + exclude = ["install.private", "change_url"] # The test IDs to be used in only/exclude statements are: install.root, install.subdir, install.nourl, install.multi, backup_restore, upgrade, upgrade.someCommitId change_url + + # ------------------------------- + # Default args to use for install + # ------------------------------- + + args.phpversion="8.0" + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4" + test_upgrade_from.00a1a6e7.args.foo = "bar" + + +# This is an additional test suite +[some_additional_testsuite] + + # On additional tests suites, you can decide to run only specific tests + + only = ["install.subdir"] + + args.language = "en_GB" + args.multisite = 1 From b69b08f18bab244e4a2880a9c8ffc2167f290c2b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 5 Apr 2023 12:13:45 +0000 Subject: [PATCH 03/12] Auto-update README --- README.md | 3 ++- README_fr.md | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0bffd18..fe42bbe 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Phpinfo for YunoHost -[![Integration level](https://dash.yunohost.org/integration/phpinfo.svg)](https://dash.yunohost.org/appci/app/phpinfo) ![Working status](https://ci-apps.yunohost.org/ci/badges/phpinfo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/phpinfo.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/phpinfo.svg)](https://dash.yunohost.org/appci/app/phpinfo) ![Working status](https://ci-apps.yunohost.org/ci/badges/phpinfo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/phpinfo.maintain.svg) + [![Install Phpinfo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=phpinfo) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 3611c3c..cca6df2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,22 +5,23 @@ It shall NOT be edited by hand. # Phpinfo pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/phpinfo.svg)](https://dash.yunohost.org/appci/app/phpinfo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/phpinfo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/phpinfo.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/phpinfo.svg)](https://dash.yunohost.org/appci/app/phpinfo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/phpinfo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/phpinfo.maintain.svg) + [![Installer Phpinfo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=phpinfo) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Phpinfo 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.* +> *Ce package vous permet d’installer Phpinfo 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.* -## Vue d'ensemble +## Vue d’ensemble Simple phpinfo **Version incluse :** 1.0~ynh4 ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -36,4 +37,4 @@ ou sudo yunohost app upgrade phpinfo -u https://github.com/YunoHost-Apps/phpinfo_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 9107f44326c627125ee9a9487df7385a3a1c7938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:17:05 +0200 Subject: [PATCH 04/12] Update tests.toml --- tests.toml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests.toml b/tests.toml index 64a6787..f8398ae 100644 --- a/tests.toml +++ b/tests.toml @@ -13,21 +13,3 @@ test_format = 1.0 # ------------------------------- args.phpversion="8.0" - - # ------------------------------- - # Commits to test upgrade from - # ------------------------------- - - test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4" - test_upgrade_from.00a1a6e7.args.foo = "bar" - - -# This is an additional test suite -[some_additional_testsuite] - - # On additional tests suites, you can decide to run only specific tests - - only = ["install.subdir"] - - args.language = "en_GB" - args.multisite = 1 From 91d3f2525f35a7dea11751b644bf9e756e018b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:18:27 +0200 Subject: [PATCH 05/12] Update manifest.toml --- manifest.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0f7ff7e..2d783ea 100644 --- a/manifest.toml +++ b/manifest.toml @@ -45,8 +45,3 @@ ram.runtime = "50M" [resources.permissions] main.url = "/" - - [resources.apt] - packages_from_raw_bash = """ - echo "php${phpversion}-fpm" - """ From d6191fadb51b133097a8ab7d0644244248cf9280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:42:59 +0200 Subject: [PATCH 06/12] fix --- manifest.toml | 3 +++ tests.toml | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2d783ea..623aab2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -45,3 +45,6 @@ ram.runtime = "50M" [resources.permissions] main.url = "/" + + [resources.apt] + packages = "php8.0-fpm" \ No newline at end of file diff --git a/tests.toml b/tests.toml index f8398ae..4be68e1 100644 --- a/tests.toml +++ b/tests.toml @@ -11,5 +11,3 @@ test_format = 1.0 # ------------------------------- # Default args to use for install # ------------------------------- - - args.phpversion="8.0" From d59afbc863a81d94bf563e0b9c8d12cfaf4c56c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:43:21 +0200 Subject: [PATCH 07/12] Update tests.toml --- tests.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests.toml b/tests.toml index 4be68e1..e31077c 100644 --- a/tests.toml +++ b/tests.toml @@ -6,8 +6,8 @@ test_format = 1.0 # Tests to run # ------------ - exclude = ["install.private", "change_url"] # The test IDs to be used in only/exclude statements are: install.root, install.subdir, install.nourl, install.multi, backup_restore, upgrade, upgrade.someCommitId change_url - + exclude = ["install.private", "change_url"] + # ------------------------------- # Default args to use for install # ------------------------------- From 312c65814b778055ec5914f5fff02e9a2bdfb1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Jul 2023 21:19:38 +0200 Subject: [PATCH 08/12] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 623aab2..39f7c09 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,7 +14,7 @@ license = "GPL-3.0-or-later" website = "https://www.php.net/manual/fr/function.phpinfo.php" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.21" architectures = "all" multi_instance = true ldap = false From 9ebbbff864550b7c123e354fd5e95fe035758d9e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 11 Nov 2023 22:05:19 +0000 Subject: [PATCH 09/12] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe42bbe..0095949 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Simple phpinfo ## Documentation and resources * Official app website: -* YunoHost documentation for this app: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index cca6df2..c4d5176 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Simple phpinfo ## Documentations et ressources * Site officiel de l’app : -* Documentation YunoHost pour cette app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From 3733e53c3155ac49b68f3faf792c6a639213c8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:10:55 +0100 Subject: [PATCH 10/12] cleaning --- conf/nginx.conf | 2 +- manifest.toml | 11 +++++++---- scripts/restore | 7 +------ scripts/upgrade | 7 +------ 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 319eef1..2dad80d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,7 +7,7 @@ location __PATH__/ { index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + client_max_body_size 50M; try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { diff --git a/manifest.toml b/manifest.toml index 39f7c09..f26d23d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,11 +14,14 @@ license = "GPL-3.0-or-later" website = "https://www.php.net/manual/fr/function.phpinfo.php" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -34,9 +37,9 @@ ram.runtime = "50M" [install.phpversion] ask.en = "Choose the version of PHP to use." ask.fr = "Choisissez la version de PHP à utiliser." - type = "string" + type = "select" choices = ["7.4", "8.0", "8.1", "8.2"] - default = "8.0" + default = "8.2" [resources] [resources.system_user] @@ -47,4 +50,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.0-fpm" \ No newline at end of file + packages = "php8.2-fpm" \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 08cbd68..3f991ef 100755 --- a/scripts/restore +++ b/scripts/restore @@ -26,12 +26,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Restoring the PHP-FPM configuration..." # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index fbdedec..dac6b85 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,12 +36,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config From 2b2bc3290a3742b5ccc769e0aaf2a89133dcf4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:11:17 +0100 Subject: [PATCH 11/12] Update manifest.toml --- manifest.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f26d23d..3824c38 100644 --- a/manifest.toml +++ b/manifest.toml @@ -34,6 +34,10 @@ ram.runtime = "50M" type = "path" default = "/phpinfo" + [install.init_main_permission] + type = "group" + default = "visitors" + [install.phpversion] ask.en = "Choose the version of PHP to use." ask.fr = "Choisissez la version de PHP à utiliser." @@ -50,4 +54,5 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.2-fpm" \ No newline at end of file + packages = "php8.2-fpm" + \ No newline at end of file From fa63673c3bb09f9c7ece47656dc4eab7b985b08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:11:43 +0100 Subject: [PATCH 12/12] cleaning --- scripts/install | 7 +------ scripts/remove | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 1c78ff1..447784c 100755 --- a/scripts/install +++ b/scripts/install @@ -28,12 +28,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index c9f5356..2c04d62 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config