From 9824705dfbc25fe8415f65a0bf66240e63f93747 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sat, 30 Dec 2017 00:15:12 +0100 Subject: [PATCH 01/13] Fix the issue alias_traversal https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md --- conf/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 74fc4df..79e996e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location __PATH__ { +rewrite ^__PATH__$ ^__PATH__/ permanent; +location __PATH__/ { # Path to source alias __FINALPATH__/ ; From 2d21ec616327317278575a35b5ed8f1a4d0b5d77 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 3 Jan 2018 23:24:48 +0100 Subject: [PATCH 02/13] Update fix alias_traversal --- conf/nginx.conf | 2 +- scripts/install | 4 ++++ scripts/upgrade | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 79e996e..8c40e3a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -rewrite ^__PATH__$ ^__PATH__/ permanent; +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { # Path to source diff --git a/scripts/install b/scripts/install index 6a4bcfa..ad73d75 100755 --- a/scripts/install +++ b/scripts/install @@ -104,6 +104,10 @@ ynh_setup_source "$final_path" #================================================= # Create a dedicated nginx config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" +fi ynh_add_nginx_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 30c17ef..f510647 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,6 +82,10 @@ ynh_setup_source "$final_path" #================================================= # Create a dedicated nginx config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" +fi ynh_add_nginx_config #================================================= From dcb447c208656f1218a0cdebe6a3c31b74d9b230 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 27 May 2018 15:44:58 +0200 Subject: [PATCH 03/13] Don't change original nginx conf file and add change_url --- scripts/change_url | 19 ++++++++++++------- scripts/install | 5 +++-- scripts/upgrade | 5 +++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 51b3b36..d18174c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -59,13 +59,18 @@ if [ $change_path -eq 1 ] then # Make a backup of the original nginx config file if modified ynh_backup_if_checksum_is_different "$nginx_conf_path" - # Replace locations starting with old_path - # Look for every location possible patterns (see https://nginx.org/en/docs/http/ngx_http_core_module.html#location) - ynh_replace_string "location\( \(=\|~\|~\*\|\^~\)\)\? $old_path" "location\1 $new_path" "$nginx_conf_path" - # Replace path in "return" directives - ynh_replace_string "return \([[:digit:]]\{3\}\) $old_path" "return \1 $new_path" "$nginx_conf_path" - # Calculate and store the nginx config file checksum - ynh_store_file_checksum "$nginx_conf_path" + # Set global variables for nginx helper + domain="$old_domain" + path_url="$new_path" + # Store path_url setting + ynh_app_setting_set $app path_url "$path_url" + # Create a dedicated nginx config + ynh_add_nginx_config + if [ "$path_url" != "/" ] + then + ynh_replace_string "^#sub_path_only" "" "$nginx_conf_path" + fi + ynh_store_file_checksum "$nginx_conf_path" fi # Change the domain for nginx diff --git a/scripts/install b/scripts/install index ad73d75..44388fd 100755 --- a/scripts/install +++ b/scripts/install @@ -104,11 +104,12 @@ ynh_setup_source "$final_path" #================================================= # Create a dedicated nginx config +ynh_add_nginx_config if [ "$path_url" != "/" ] then - ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" + ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" fi -ynh_add_nginx_config +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index f510647..015e6b6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,11 +82,12 @@ ynh_setup_source "$final_path" #================================================= # Create a dedicated nginx config +ynh_add_nginx_config if [ "$path_url" != "/" ] then - ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" + ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" fi -ynh_add_nginx_config +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER From fac62c49ff1f1199384288cecb6a4fad50adcd1a Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 27 May 2018 15:50:56 +0200 Subject: [PATCH 04/13] Use newest version of ynh_add_nginx_config from #462 No more need to deal with "#sub_path_only" --- scripts/change_url | 5 ----- scripts/install | 5 ----- scripts/upgrade | 5 ----- 3 files changed, 15 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index d18174c..4a5b18d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -66,11 +66,6 @@ then ynh_app_setting_set $app path_url "$path_url" # Create a dedicated nginx config ynh_add_nginx_config - if [ "$path_url" != "/" ] - then - ynh_replace_string "^#sub_path_only" "" "$nginx_conf_path" - fi - ynh_store_file_checksum "$nginx_conf_path" fi # Change the domain for nginx diff --git a/scripts/install b/scripts/install index 44388fd..6a4bcfa 100755 --- a/scripts/install +++ b/scripts/install @@ -105,11 +105,6 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" -fi -ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 015e6b6..30c17ef 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,11 +83,6 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" -fi -ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER From e2911b3db0afe650e1c49bf6e08aceee4e6079dd Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 27 May 2018 16:05:00 +0200 Subject: [PATCH 05/13] Revert "Use newest version of ynh_add_nginx_config from #462" as it's not released (and subject to discussions)! This reverts commit fac62c49ff1f1199384288cecb6a4fad50adcd1a. --- scripts/change_url | 5 +++++ scripts/install | 5 +++++ scripts/upgrade | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 4a5b18d..d18174c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -66,6 +66,11 @@ then ynh_app_setting_set $app path_url "$path_url" # Create a dedicated nginx config ynh_add_nginx_config + if [ "$path_url" != "/" ] + then + ynh_replace_string "^#sub_path_only" "" "$nginx_conf_path" + fi + ynh_store_file_checksum "$nginx_conf_path" fi # Change the domain for nginx diff --git a/scripts/install b/scripts/install index 6a4bcfa..44388fd 100755 --- a/scripts/install +++ b/scripts/install @@ -105,6 +105,11 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" +fi +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 30c17ef..015e6b6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,6 +83,11 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" +fi +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER From b64d6c99615d8c8ac7457b55769782e52eb1546f Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Thu, 14 Jun 2018 23:03:29 +0200 Subject: [PATCH 06/13] Fix indentation --- scripts/change_url | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index d18174c..edaede5 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -57,8 +57,8 @@ nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the nginx config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified - ynh_backup_if_checksum_is_different "$nginx_conf_path" + # Make a backup of the original nginx config file if modified + ynh_backup_if_checksum_is_different "$nginx_conf_path" # Set global variables for nginx helper domain="$old_domain" path_url="$new_path" @@ -68,7 +68,7 @@ then ynh_add_nginx_config if [ "$path_url" != "/" ] then - ynh_replace_string "^#sub_path_only" "" "$nginx_conf_path" + ynh_replace_string "^#sub_path_only " "" "$nginx_conf_path" fi ynh_store_file_checksum "$nginx_conf_path" fi @@ -76,11 +76,11 @@ fi # Change the domain for nginx if [ $change_domain -eq 1 ] then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum "$nginx_conf_path" + # Delete file checksum for the old conf file location + ynh_delete_file_checksum "$nginx_conf_path" mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" + # Store file checksum for the new config file location + ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" fi #================================================= From 8a2330837be2ad231cc4c6fc316ec65455b7eb23 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 28 Jun 2018 22:05:35 +0200 Subject: [PATCH 07/13] Add comments and upgrade some stuff --- README.md | 78 +++++++++++++++++++++++---- check_process.default | 4 +- conf/nginx.conf | 12 ++--- manifest.json | 17 +++++- scripts/backup | 6 ++- scripts/change_url | 7 --- scripts/install | 123 ++++++++++++++++++++++++++++++++++-------- scripts/remove | 4 +- scripts/restore | 4 ++ scripts/upgrade | 26 +++++---- 10 files changed, 213 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index 40e7524..7431a1e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,82 @@ # Example app for YunoHost -- [Yunohost project](https://yunohost.org) -- [Exemple app website](https://example.com) +[![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://ci-apps.yunohost.org/jenkins/job/REPLACEBYYOURAPP%20%28Community%29/lastBuild/consoleFull) +[![Install REPLACEBYYOURAPP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) -Description of the app. +> *This package allow you to install REPLACEBYYOURAPP 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.* -## Usage -- Copy this app before work on it. +## Overview +Quick description of this app. + +**Shipped version:** 1.0 + +## Screenshots + +![](Link to an screenshot for this app) + +## Demo + +* [Official demo](Link to a demo site for this app) + +## Configuration + +How to configure this app ? By an admin panel, an plain file with ssh, or any other way. + +## Documentation + + * Official documentation: Link to the official documentation of this app + * YunoHost documentation: There no other documentations, feel free to contribute. + +## YunoHost specific features + +#### Multi-users support + +Is LDAP and HTTP auth supported ? +Can the app be used by multiple users ? + +#### Supported architectures + +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/jenkins/job/REPLACEBYYOURAPP%20(Community)/badge/icon)](https://ci-apps.yunohost.org/jenkins/job/REPLACEBYYOURAPP%20(Community)/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/jenkins/job/REPLACEBYYOURAPP%20(Community)%20(%7EARM%7E)/badge/icon)](https://ci-apps-arm.yunohost.org/jenkins/job/REPLACEBYYOURAPP%20(Community)%20(%7EARM%7E)/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/jenkins/job/REPLACEBYYOURAPP%20(Community)/badge/icon)](https://ci-stretch.nohost.me/jenkins/job/REPLACEBYYOURAPP%20(Community)/) + +## Limitations + +* Any known limitations. + +## Additionnal informations + +* Other informations you would add about this application + +### Usage of this package +- Copy this app before working on it. - Edit `conf/nginx.conf` file to match application prerequisites. - Edit `manifest.json` with application specific information. - Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts. - Add a `LICENSE` file for the package. - Edit `README.md`. -**More information on the documentation page:** +**More information on the documentation page:** https://yunohost.org/packaging_apps -**Upgrade this package:** -`sudo yunohost app upgrade --verbose example -u https://github.com/YunoHost-Apps/example_ynh` +## Links + + * Report a bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues + * APP website: Link to the official website of this app + * YunoHost website: https://yunohost.org/ + +--- + +Developers infos +---------------- + +**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/REPLACEBYYOURAPP_ynh/tree/testing). -**Multi-user:** Yes/No. How about the ldap and HTTP auth support. +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --verbose +or +sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --verbose +``` diff --git a/check_process.default b/check_process.default index d7e2812..480a103 100644 --- a/check_process.default +++ b/check_process.default @@ -29,9 +29,9 @@ Level 1=auto Level 2=auto Level 3=auto -# Level 4: +# Level 4: If the app supports LDAP and SSOwat, turn level 4 to '1' and add a link to an issue or a part of your code to show it. +# If the app does not use LDAP nor SSOwat, and can't use them, turn level 4 to 'na' and explain as well. Level 4=0 -# Level 5: Level 5=auto Level 6=auto Level 7=auto diff --git a/conf/nginx.conf b/conf/nginx.conf index 8c40e3a..d496165 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,12 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; + # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - # Example PHP configuration (remove if not used) +### Example PHP configuration (remove it if not used) index index.php; # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file @@ -19,20 +20,13 @@ location __PATH__/ { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock; - # If you don't use a dedicated fpm config for your app, - # use a general fpm pool. - # This is to be used INSTEAD of line above - # Don't forget to adjust scripts install/upgrade/remove/backup accordingly - # - #fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } - # PHP configuration end +### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/manifest.json b/manifest.json index 0179154..a807cbf 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Example package for YunoHost application.", "fr": "Exemple de package d’application pour YunoHost." }, - "version": "1.0", + "version": "1.0~ynh1", "url": "https://example.com", "license": "free", "maintainer": { @@ -15,7 +15,7 @@ "url": "http://example.com" }, "requirements": { - "yunohost": ">= 2.7.2" + "yunohost": ">= 2.7.14" }, "multi_instance": true, "services": [ @@ -70,6 +70,19 @@ }, "choices": ["fr", "en"], "default": "fr" + }, + { + "name": "password", + "type": "password", + "ask": { + "en": "Set the administrator password", + "fr": "Définissez le mot de passe administrateur" + }, + "help": { + "en": "Use the help field to add an information for the admin about this question.", + "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." + }, + "example": "Choose a password" } ] } diff --git a/scripts/backup b/scripts/backup index 7c88c04..885a27f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -18,6 +18,10 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -73,7 +77,7 @@ ynh_backup "/etc/logrotate.d/$app" ynh_backup "/etc/systemd/system/$app.service" #================================================= -# BACKUP THE CRON FILE +# BACKUP A CRON FILE #================================================= ynh_backup "/etc/cron.d/$app" diff --git a/scripts/change_url b/scripts/change_url index edaede5..f86e99b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -57,8 +57,6 @@ nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the nginx config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified - ynh_backup_if_checksum_is_different "$nginx_conf_path" # Set global variables for nginx helper domain="$old_domain" path_url="$new_path" @@ -66,11 +64,6 @@ then ynh_app_setting_set $app path_url "$path_url" # Create a dedicated nginx config ynh_add_nginx_config - if [ "$path_url" != "/" ] - then - ynh_replace_string "^#sub_path_only " "" "$nginx_conf_path" - fi - ynh_store_file_checksum "$nginx_conf_path" fi # Change the domain for nginx diff --git a/scripts/install b/scripts/install index 44388fd..e82b024 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,10 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -25,17 +29,18 @@ path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE - -# This is a multi-instance app, meaning it can be installed several times independently -# The id of the app as stated in the manifest is available as $YNH_APP_ID -# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) -# The app instance name is available as $YNH_APP_INSTANCE_NAME -# - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample -# - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 -# - ynhexample__{N} for the subsequent installations, with N=3,4, ... -# The app instance name is probably what you are interested the most, since this is -# guaranteed to be unique. This is a good unique identifier to define installation path, -# db names, ... +password=$YNH_APP_ARG_PASSWORD + +### If it's a multi-instance app, meaning it can be installed several times independently +### The id of the app as stated in the manifest is available as $YNH_APP_ID +### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) +### The app instance name is available as $YNH_APP_INSTANCE_NAME +### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample +### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 +### - ynhexample__{N} for the subsequent installations, with N=3,4, ... +### The app instance name is probably what you are interested the most, since this is +### guaranteed to be unique. This is a good unique identifier to define installation path, +### db names, ... app=$YNH_APP_INSTANCE_NAME #================================================= @@ -69,6 +74,11 @@ ynh_app_setting_set $app language $language # FIND AND OPEN A PORT #================================================= +### Use these lines if you have to open a port for the application +### `ynh_find_port` will find the first available port starting to the given port. +### If you're not using these lines: +### - Remove the section "CLOSE A PORT" in the remove script + # Find a free port port=$(ynh_find_port 8095) # Open this port @@ -79,13 +89,27 @@ ynh_app_setting_set $app port $port # INSTALL DEPENDENCIES #================================================= +### `ynh_install_app_dependencies` allow you to add any "apt" dependencies to the package. +### Those deb packages will be installed as dependencies of this package. +### If you're not using this helper: +### - Remove the section "REMOVE DEPENDENCIES" in the remove script +### - As well as the section "REINSTALL DEPENDENCIES" in the restore script +### - And the section "UPGRADE DEPENDENCIES" in the upgrade script + ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE A MYSQL DATABASE #================================================= -# If your app uses a MySQL database, you can use these lines to bootstrap -# a database, an associated user and save the password in app settings + +### Use these lines if you need a database for the application. +### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. +### The password will be stored as 'mysqlpwd' into the app settings, +### and will be available as $db_pwd +### If you're not using these lines: +### - Remove the section "BACKUP THE MYSQL DATABASE" in the backup script +### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script +### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script db_name=$(ynh_sanitize_dbid $app) ynh_app_setting_set $app db_name $db_name @@ -95,6 +119,10 @@ ynh_mysql_setup_db $db_name $db_name # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +### `ynh_setup_source` is used to install an app from a zip or tar.gz file, +### from an upstream source, like a git repository. +### `ynh_setup_source` use the file conf/app.src + ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -103,13 +131,10 @@ ynh_setup_source "$final_path" # NGINX CONFIGURATION #================================================= +### `ynh_add_nginx_config` will use the file conf/nginx.conf + # Create a dedicated nginx config ynh_add_nginx_config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" -fi -ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER @@ -122,6 +147,17 @@ ynh_system_user_create $app # PHP-FPM CONFIGURATION #================================================= +### `ynh_add_fpm_config` is used to set up an php config. +### You can remove it if your app doesn't use php. +### `ynh_add_fpm_config` will use the files conf/php-fpm.conf and conf/php-fpm.ini +### If you're not using these lines: +### - You can remove those files in conf/. +### - Remove the section "BACKUP THE PHP-FPM CONFIGURATION" in the backup script +### - Remove also the section "REMOVE PHP-FPM CONFIGURATION" in the remove script +### - As well as the section "RESTORE THE PHP-FPM CONFIGURATION" in the restore script +### With the reload at the end of the script. +### - And the section "PHP-FPM CONFIGURATION" in the upgrade script + # Create a dedicated php-fpm config ynh_add_fpm_config @@ -135,6 +171,17 @@ ynh_add_fpm_config # SETUP SYSTEMD #================================================= +### `ynh_systemd_config` is used to configure a systemd script for an app. +### It can be used for app would use sysvinit (with adaptation) or systemd. +### Have a look to the app to be sure this app need a systemd script. +### `ynh_systemd_config` will use the file conf/systemd.service +### If you're not using these lines: +### - You can remove those files in conf/. +### - Remove the section "BACKUP SYSTEMD" in the backup script +### - Remove also the section "STOP AND REMOVE SERVICE" in the remove script +### - As well as the section "RESTORE SYSTEMD" in the restore script +### - And the section "SETUP SYSTEMD" in the upgrade script + # Create a dedicated systemd config ynh_systemd_config @@ -142,6 +189,10 @@ ynh_systemd_config # SETUP APPLICATION WITH CURL #================================================= +### Use those lines only if the app need to be installed by a web application +### Because, we don't want to ask the final user to it himself, +### we're going to use curl to fill the field of the application. + # Set right permissions for curl install chown -R $app: $final_path @@ -156,16 +207,28 @@ systemctl reload nginx # Installation with curl ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" +# Remove the public access +if [ $is_public -eq 0 ] +then + ynh_app_setting_delete $app skipped_uris +fi + #================================================= # MODIFY A CONFIG FILE #================================================= +### `ynh_replace_string` is used to replace string in a file. + ynh_replace_string "match_string" "replace_string" "$final_path/CONFIG_FILE" #================================================= # STORE THE CHECKSUM OF THE CONFIG FILE #================================================= +### `ynh_store_file_checksum` is used to store the checksum of a file. +### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`, +### you can make a backup of this file before modifying it again if the admin had modified it. + # Calculate and store the config file checksum into the app settings ynh_store_file_checksum "$final_path/CONFIG_FILE" @@ -175,6 +238,10 @@ ynh_store_file_checksum "$final_path/CONFIG_FILE" # SECURE FILES AND DIRECTORIES #================================================= +### For security reason, any app should set the permission to root: before anything else. +### Then, if write authorisation is needed, any access should be given only to directories +### that really need such authorisations. + # Set permissions to app files chown -R root: $final_path @@ -182,6 +249,14 @@ chown -R root: $final_path # SETUP LOGROTATE #================================================= +### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. +### Use this helper only if there effectively a log for this app. +### If you're not using this helper: +### - Remove the section "BACKUP LOGROTATE" in the backup script +### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script +### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script +### - And the section "SETUP LOGROTATE" in the upgrade script + # Use logrotate to manage application logfile(s) ynh_use_logrotate @@ -189,16 +264,20 @@ ynh_use_logrotate # ADVERTISE SERVICE IN ADMIN PANEL #================================================= +### `yunohost service add` is a cli yunohost command to add a service in the admin panel. +### You'll find the service in the 'services' section of YunoHost admin panel. +### This cli command would be useless if the app does not have any services (systemd or sysvinit) +### If you're not using these lines: +### - You can remove those files in conf/. +### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script +### - As well as the section ADVERTISE SERVICE IN ADMIN PANEL" in the restore script + yunohost service add NAME_INIT.D --log "/var/log/FILE.log" #================================================= # SETUP SSOWAT #================================================= -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete $app skipped_uris -fi # Make app public if necessary if [ $is_public -eq 1 ] then diff --git a/scripts/remove b/scripts/remove index 4367e39..9a0cf88 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) -port=$(ynh_app_setting_get $app port) db_name=$(ynh_app_setting_get $app db_name) final_path=$(ynh_app_setting_get $app final_path) @@ -33,6 +32,7 @@ ynh_remove_systemd_config # REMOVE SERVICE FROM ADMIN PANEL #================================================= +# Remove a service from the admin panel, added by `yunohost service add` if yunohost service status | grep -q $app then echo "Remove $app service" @@ -87,7 +87,7 @@ ynh_remove_logrotate if yunohost firewall list | grep -q "\- $port$" then - echo "Close port $port" + echo "Close port $port" >&2 yunohost firewall disallow TCP $port 2>&1 fi diff --git a/scripts/restore b/scripts/restore index 73ac8e3..a757e9c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -18,6 +18,10 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + #### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/upgrade b/scripts/upgrade index 015e6b6..5063082 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ path_url=$(ynh_app_setting_get $app path) admin=$(ynh_app_setting_get $app admin) is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) -port=$(ynh_app_setting_get $app port) +language=$(ynh_app_setting_get $app language) db_name=$(ynh_app_setting_get $app db_name) #================================================= @@ -83,17 +83,18 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" -fi -ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# UPGRADE DEPENDENCIES +#================================================= + +ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE DEDICATED USER #================================================= -# Create a system user +# Create the dedicated user (if not existing) ynh_system_user_create $app #================================================= @@ -109,9 +110,10 @@ ynh_add_fpm_config # ... #================================================= -# Verify the checksum and backup the file if it's different +### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. +### And create a backup of this file if the checksum is different. So the file will be backup if the admin has modified it. ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" -# Recalculate and store the config file checksum into the app settings +# Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/CONFIG_FILE" #================================================= @@ -134,17 +136,13 @@ ynh_add_systemd_config # SECURE FILES AND DIRECTORIES #================================================= -# Set right permissions for curl installation +# Set permissions on app files chown -R root: $final_path #================================================= # SETUP SSOWAT #================================================= -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete $app skipped_uris -fi # Make app public if necessary if [ $is_public -eq 1 ] then From 1c9c94ef65a7413af758236a3e34ebfa50df45ec Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 1 Jul 2018 09:57:16 +0200 Subject: [PATCH 08/13] Various typo fixes --- README.md | 30 +++++++++++++++--------------- scripts/install | 44 +++++++++++++++++++++++--------------------- scripts/remove | 1 + scripts/upgrade | 4 ++-- 4 files changed, 41 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 7431a1e..a52d89f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +# Usage of this package (REMOVE THIS SECTION BEFORE RELEASE) +- Copy this app before working on it. +- Edit `conf/nginx.conf` file to match application prerequisites. +- Edit `manifest.json` with application specific information. +- Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts. +- Add a `LICENSE` file for the package. +- Edit `README.md`. + # Example app for YunoHost [![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://ci-apps.yunohost.org/jenkins/job/REPLACEBYYOURAPP%20%28Community%29/lastBuild/consoleFull) @@ -21,7 +29,7 @@ Quick description of this app. ## Configuration -How to configure this app ? By an admin panel, an plain file with ssh, or any other way. +How to configure this app: by an admin panel, a plain file with ssh, or any other way. ## Documentation @@ -32,8 +40,8 @@ How to configure this app ? By an admin panel, an plain file with ssh, or any ot #### Multi-users support -Is LDAP and HTTP auth supported ? -Can the app be used by multiple users ? +Are LDAP and HTTP auth supported? +Can the app be used by multiple users? #### Supported architectures @@ -45,25 +53,17 @@ Can the app be used by multiple users ? * Any known limitations. -## Additionnal informations +## Additional informations * Other informations you would add about this application -### Usage of this package -- Copy this app before working on it. -- Edit `conf/nginx.conf` file to match application prerequisites. -- Edit `manifest.json` with application specific information. -- Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts. -- Add a `LICENSE` file for the package. -- Edit `README.md`. - **More information on the documentation page:** https://yunohost.org/packaging_apps ## Links * Report a bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues - * APP website: Link to the official website of this app + * App website: Link to the official website of this app * YunoHost website: https://yunohost.org/ --- @@ -76,7 +76,7 @@ Please do your pull request to the [testing branch](https://github.com/YunoHost- To try the testing branch, please proceed like that. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --verbose +sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing or -sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --verbose +sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing ``` diff --git a/scripts/install b/scripts/install index f221470..3018bf2 100755 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ password=$YNH_APP_ARG_PASSWORD ### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample ### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 ### - ynhexample__{N} for the subsequent installations, with N=3,4, ... -### The app instance name is probably what you are interested the most, since this is +### The app instance name is probably what interests you most, since this is ### guaranteed to be unique. This is a good unique identifier to define installation path, ### db names, ... app=$YNH_APP_INSTANCE_NAME @@ -75,7 +75,7 @@ ynh_app_setting_set $app language $language #================================================= ### Use these lines if you have to open a port for the application -### `ynh_find_port` will find the first available port starting to the given port. +### `ynh_find_port` will find the first available port starting from the given port. ### If you're not using these lines: ### - Remove the section "CLOSE A PORT" in the remove script @@ -89,7 +89,7 @@ ynh_app_setting_set $app port $port # INSTALL DEPENDENCIES #================================================= -### `ynh_install_app_dependencies` allow you to add any "apt" dependencies to the package. +### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. ### Those deb packages will be installed as dependencies of this package. ### If you're not using this helper: ### - Remove the section "REMOVE DEPENDENCIES" in the remove script @@ -120,7 +120,7 @@ ynh_mysql_setup_db $db_name $db_name #================================================= ### `ynh_setup_source` is used to install an app from a zip or tar.gz file, -### from an upstream source, like a git repository. +### downloaded from an upstream source, like a git repository. ### `ynh_setup_source` use the file conf/app.src ynh_app_setting_set $app final_path $final_path @@ -152,11 +152,11 @@ ynh_system_user_create $app # PHP-FPM CONFIGURATION #================================================= -### `ynh_add_fpm_config` is used to set up an php config. -### You can remove it if your app doesn't use php. +### `ynh_add_fpm_config` is used to set up a PHP config. +### You can remove it if your app doesn't use PHP. ### `ynh_add_fpm_config` will use the files conf/php-fpm.conf and conf/php-fpm.ini ### If you're not using these lines: -### - You can remove those files in conf/. +### - You can remove these files in conf/. ### - Remove the section "BACKUP THE PHP-FPM CONFIGURATION" in the backup script ### - Remove also the section "REMOVE PHP-FPM CONFIGURATION" in the remove script ### - As well as the section "RESTORE THE PHP-FPM CONFIGURATION" in the restore script @@ -177,8 +177,8 @@ ynh_add_fpm_config #================================================= ### `ynh_systemd_config` is used to configure a systemd script for an app. -### It can be used for app would use sysvinit (with adaptation) or systemd. -### Have a look to the app to be sure this app need a systemd script. +### It can be used for apps that use sysvinit (with adaptation) or systemd. +### Have a look at the app to be sure this app needs a systemd script. ### `ynh_systemd_config` will use the file conf/systemd.service ### If you're not using these lines: ### - You can remove those files in conf/. @@ -194,9 +194,10 @@ ynh_add_systemd_config # SETUP APPLICATION WITH CURL #================================================= -### Use those lines only if the app need to be installed by a web application -### Because, we don't want to ask the final user to it himself, -### we're going to use curl to fill the field of the application. +### Use these lines only if the app installation needs to be finalized through +### web forms. We generally don't want to ask the final user, +### so we're going to use curl to automatically fill the fields and submit the +### forms. # Set right permissions for curl install chown -R $app: $final_path @@ -222,12 +223,13 @@ fi # MODIFY A CONFIG FILE #================================================= -### `ynh_replace_string` is used to replace string in a file. +### `ynh_replace_string` is used to replace a string in a file. +### (It's compatible with sed regular expressions syntax) ynh_replace_string "match_string" "replace_string" "$final_path/CONFIG_FILE" #================================================= -# STORE THE CHECKSUM OF THE CONFIG FILE +# STORE THE CONFIG FILE CHECKSUM #================================================= ### `ynh_store_file_checksum` is used to store the checksum of a file. @@ -243,9 +245,9 @@ ynh_store_file_checksum "$final_path/CONFIG_FILE" # SECURE FILES AND DIRECTORIES #================================================= -### For security reason, any app should set the permission to root: before anything else. -### Then, if write authorisation is needed, any access should be given only to directories -### that really need such authorisations. +### For security reason, any app should set the permissions to root: before anything else. +### Then, if write authorization is needed, any access should be given only to directories +### that really need such authorization. # Set permissions to app files chown -R root: $final_path @@ -255,7 +257,7 @@ chown -R root: $final_path #================================================= ### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. -### Use this helper only if there effectively a log for this app. +### Use this helper only if there is effectively a log file for this app. ### If you're not using this helper: ### - Remove the section "BACKUP LOGROTATE" in the backup script ### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script @@ -269,11 +271,11 @@ ynh_use_logrotate # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -### `yunohost service add` is a cli yunohost command to add a service in the admin panel. +### `yunohost service add` is a CLI yunohost command to add a service in the admin panel. ### You'll find the service in the 'services' section of YunoHost admin panel. -### This cli command would be useless if the app does not have any services (systemd or sysvinit) +### This CLI command would be useless if the app does not have any services (systemd or sysvinit) ### If you're not using these lines: -### - You can remove those files in conf/. +### - You can remove these files in conf/. ### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script ### - As well as the section ADVERTISE SERVICE IN ADMIN PANEL" in the restore script diff --git a/scripts/remove b/scripts/remove index 2498695..f3e6ebe 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,6 +16,7 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) +port=$(ynh_app_setting_get $app port) db_name=$(ynh_app_setting_get $app db_name) db_user=$db_name final_path=$(ynh_app_setting_get $app final_path) diff --git a/scripts/upgrade b/scripts/upgrade index 2cfb75d..6991022 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,7 +99,7 @@ ynh_install_app_dependencies deb1 deb2 # CREATE DEDICATED USER #================================================= -# Create the dedicated user (if not existing) +# Create a dedicated user (if not existing) ynh_system_user_create $app #================================================= @@ -116,7 +116,7 @@ ynh_add_fpm_config #================================================= ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. -### And create a backup of this file if the checksum is different. So the file will be backup if the admin has modified it. +### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/CONFIG_FILE" From 7f1a4f01887ad12ab789f93d50e36fa0e5dec2e1 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 1 Jul 2018 10:11:12 +0200 Subject: [PATCH 09/13] Add --debug option instead of --verbose --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a52d89f..df120d3 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Please do your pull request to the [testing branch](https://github.com/YunoHost- To try the testing branch, please proceed like that. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing +sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug or -sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing +sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug ``` From 460e87957e2956742966f595ea6609b25f7cd61e Mon Sep 17 00:00:00 2001 From: Josue-T Date: Sat, 7 Jul 2018 22:34:54 +0200 Subject: [PATCH 10/13] Add comment about final_path --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 3018bf2..6eaf932 100755 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,9 @@ app=$YNH_APP_INSTANCE_NAME # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= +### In case of an app wich use directly nginx as webserver wich is written in html, php the final path is "/var/www/$app" +### For the app which has an internal webserver or which use uwsgi wich is written in python, java, go, ... +### the final path is "/opt/yunohost/$app" final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" From 6390de8719eb48fd98bbb18e99d2f218caeee0ca Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Sun, 8 Jul 2018 09:14:36 +0200 Subject: [PATCH 11/13] Comment rephrasing --- scripts/install | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 6eaf932..6ccf5b4 100755 --- a/scripts/install +++ b/scripts/install @@ -47,9 +47,8 @@ app=$YNH_APP_INSTANCE_NAME # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -### In case of an app wich use directly nginx as webserver wich is written in html, php the final path is "/var/www/$app" -### For the app which has an internal webserver or which use uwsgi wich is written in python, java, go, ... -### the final path is "/opt/yunohost/$app" +### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". +### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" From 49529ac03a5c480eb4b632199e128c60c7e3f32a Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 29 Jul 2018 20:14:01 +0200 Subject: [PATCH 12/13] Remove sub_path_only for nginx from install script --- scripts/install | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/install b/scripts/install index 6ccf5b4..ce7ca86 100755 --- a/scripts/install +++ b/scripts/install @@ -137,11 +137,6 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" -fi -ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER From 397a241df6a93c7adcb83fc3ff14c6932bd982aa Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 29 Jul 2018 20:14:08 +0200 Subject: [PATCH 13/13] Remove sub_path_only for nginx from upgrade script --- scripts/upgrade | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6991022..6a76809 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,11 +83,6 @@ ynh_setup_source "$final_path" # Create a dedicated nginx config ynh_add_nginx_config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" -fi -ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # UPGRADE DEPENDENCIES