1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00
*  Upgrade to v.0.05.9
* [fix] Chromium net::ERR_HTTP2_PROTOCOL_ERROR 200

Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com>
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
Éric Gaspar 2020-12-19 11:11:56 +01:00 committed by GitHub
parent cbc4e957f3
commit 69053f7a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 60 additions and 90 deletions

View file

@ -1,7 +1,7 @@
# Lufi for YunoHost # Lufi for YunoHost
[![Integration level](https://dash.yunohost.org/integration/lufi.svg)](https://dash.yunohost.org/appci/app/lufi) ![](https://ci-apps.yunohost.org/ci/badges/lufi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lufi.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/lufi.svg)](https://dash.yunohost.org/appci/app/lufi) ![](https://ci-apps.yunohost.org/ci/badges/lufi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lufi.maintain.svg)
[![Install Lufi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=lufi) [![Install Lufi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lufi)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -16,7 +16,7 @@ The administrator of the Lufi instance you use will not be able to see what is i
The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), that means this part is only processed client-side and does not reach the server. :-) The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), that means this part is only processed client-side and does not reach the server. :-)
**Shipped version:** 0.03.5 **Shipped version:** 0.05.9
## Screenshots ## Screenshots
@ -28,11 +28,12 @@ The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https:
## Configuration ## Configuration
How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH. * How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH.
## Documentation ## Documentation
* Official documentation: https://framagit.org/luc/lufi/wikis/home * Official documentation: https://framagit.org/luc/lufi/wikis/home
* YunoHost documentation: https://yunohost.org/#/app_lufi
## YunoHost specific features ## YunoHost specific features
@ -46,9 +47,6 @@ Can the app be used by multiple users? **Yes**
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lufi/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lufi/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lufi/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lufi/)
**More info on the documentation page:**
https://yunohost.org/packaging_apps
## Links ## Links
* Report a bug: https://github.com/YunoHost-Apps/lufi_ynh/issues * Report a bug: https://github.com/YunoHost-Apps/lufi_ynh/issues
@ -57,8 +55,7 @@ https://yunohost.org/packaging_apps
--- ---
Developer info ## Developer info
----------------
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/lufi_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/lufi_ynh/tree/testing).

View file

@ -1,7 +1,7 @@
# Lufi pour YunoHost # Lufi pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/lufi.svg)](https://dash.yunohost.org/appci/app/lufi) ![](https://ci-apps.yunohost.org/ci/badges/lufi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lufi.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/lufi.svg)](https://dash.yunohost.org/appci/app/lufi) ![](https://ci-apps.yunohost.org/ci/badges/lufi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lufi.maintain.svg)
[![Installer Lufi avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=lufi) [![Installer Lufi avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lufi)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
@ -11,11 +11,11 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Vue d'ensemble ## Vue d'ensemble
Il stocke vos fichiers et vous permet de les télécharger. Il stocke vos fichiers et vous permet de les télécharger.
Est-ce tout? Non. Tous les fichiers sont chiffrés par le navigateur! L'administrateur de l'instance Lufi ne pourra pas voir quel est votre administrateur réseau ou votre FAI. Est-ce tout ? Non. Tous les fichiers sont chiffrés par le navigateur ! L'administrateur de l'instance Lufi ne pourra pas voir quel est votre administrateur réseau ou votre FAI.
La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), ce qui signifie que cette partie n'est traitée que par le client et n'atteint pas le serveur. :-) La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), ce qui signifie que cette partie n'est traitée que par le client et n'atteint pas le serveur. :-)
**Version incluse:** 0.03.5 **Version incluse:** 0.05.9
## Captures d'écran ## Captures d'écran
@ -27,11 +27,12 @@ La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.w
## Configuration ## Configuration
Comment configurer cette application: un fichier brut en SSH. * Comment configurer cette application: un fichier brut `/var/www/lufi/lufi.conf` en SSH.
## Documentation ## Documentation
* Documentation officielle: https://framagit.org/luc/lufi/wikis/home * Documentation officielle : https://framagit.org/luc/lufi/wikis/home
* Documentation YunoHost : https://yunohost.org/#/app_lufi_fr
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost
@ -53,8 +54,7 @@ Comment configurer cette application: un fichier brut en SSH.
--- ---
Informations pour les développeurs ## Informations pour les développeurs
----------------
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lufi_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lufi_ynh/tree/testing).

View file

@ -14,21 +14,12 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 0.01
upgrade=1 from_commit=1d53901957efcf8861b10efc8d3f081cadd2ba9e
# 0.03.5 # 0.03.5
upgrade=1 from_commit=6e05053ee90370e659d16abd9dcd9220e9e497f5 upgrade=1 from_commit=64a53051c3cd12840ca32b2fdaf0c3063e0158bf
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
# incorrect_path=1
port_already_use=1 (8095) port_already_use=1 (8095)
change_url=1 change_url=1
;;; Levels
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
Level 5=auto
;;; Upgrade options ;;; Upgrade options
; commit=1d53901957efcf8861b10efc8d3f081cadd2ba9e ; commit=64a53051c3cd12840ca32b2fdaf0c3063e0158bf
name=0.01 name=Merge pull request #42 from YunoHost-Apps/testing
; commit=6e05053ee90370e659d16abd9dcd9220e9e497f5
name=0.03.5

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lufi/-/archive/0.03.5/lufi-0.03.5.tar.gz SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lufi/-/archive/0.05.9/lufi-0.05.9.tar.gz
SOURCE_SUM=aeb4bb4e7b4d5a7a12a7b8a49578e98c4ef8b6cb606b266b4531767a6ea6debe SOURCE_SUM=96712861334c7b1bad9f64b4a07f1f2e8d57cd5ad462881b003c3b329da00229
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -1,11 +1,11 @@
# Génération des statistiques. Tous les jours, à 5h. # Génération des statistiques. Tous les jours, à 5h.
0 5 * * * __USER__ cd "__FINALPATH__" && /usr/local/bin/carton exec script/lufi cron stats 0 5 * * * __USER__ cd "__FINALPATH__" && /usr/bin/carton exec script/lufi cron stats
# Suppression des adresses IP obsolètes. Tous les jours, à 6h. # Suppression des adresses IP obsolètes. Tous les jours, à 6h.
0 6 * * * __USER__ cd "__FINALPATH__" && /usr/local/bin/carton exec script/lufi cron cleanbdd 0 6 * * * __USER__ cd "__FINALPATH__" && /usr/bin/carton exec script/lufi cron cleanbdd
# Suppression des images dont le délai a expiré. Tous les jours, à 6h. # Suppression des images dont le délai a expiré. Tous les jours, à 6h.
0 6 * * * __USER__ cd "__FINALPATH__" && /usr/local/bin/carton exec script/lufi cron cleanfiles 0 6 * * * __USER__ cd "__FINALPATH__" && /usr/bin/carton exec script/lufi cron cleanfiles
# Vérification de l'occupation du dossier des images. Tous les jours, à 7h. # Vérification de l'occupation du dossier des images. Tous les jours, à 7h.
0 7 * * * __USER__ cd "__FINALPATH__" && /usr/local/bin/carton exec script/lufi cron watch 0 7 * * * __USER__ cd "__FINALPATH__" && /usr/bin/carton exec script/lufi cron watch

View file

@ -5,21 +5,20 @@ location __PATH__/ {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
# This is important for user's privacy ! # This is important for user's privacy!
access_log off; access_log off;
error_log /var/log/nginx/lufi.error.log; error_log /var/log/nginx/lufi.error.log;
# This is important ! Make it OK with your Lutim configuration # This is important! Make it OK with your Lutim configuration
client_max_body_size __MAX_FILE_SIZE__M; client_max_body_size __MAX_FILE_SIZE__M;
if ($request_uri ~* ^/(img|css|font|js)/) { if ($request_uri ~* ^/(img|css|font|js)/) {
more_set_headers Expires "Thu, 31 Dec 2037 23:55:55 GMT"; more_set_headers "Cache-Control: public, max-age=315360000";
more_set_headers Cache-Control "public, max-age=315360000";
} }
proxy_pass http://127.0.0.1:__PORT____PATH__; proxy_pass http://127.0.0.1:__PORT____PATH__;
# Really important ! Lufi uses WebSocket, it won't work without this # Really important! Lufi uses WebSocket, it won't work without this
proxy_set_header Upgrade $http_upgrade ; proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "upgrade" ; proxy_set_header Connection "upgrade" ;

View file

@ -10,9 +10,9 @@ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
PIDFile=__FINALPATH__/script/hypnotoad.pid PIDFile=__FINALPATH__/script/hypnotoad.pid
ExecStart=/usr/local/bin/carton exec hypnotoad script/lufi ExecStart=/usr/bin/carton exec hypnotoad script/lufi
ExecStop=/usr/local/bin/carton exec hypnotoad -s script/lufi ExecStop=/usr/bin/carton exec hypnotoad -s script/lufi
ExecReload=/usr/local/bin/carton exec hypnotoad script/lufi ExecReload=/usr/bin/carton exec hypnotoad script/lufi
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -7,8 +7,8 @@ about: Create a report to help us debug, it would be nice to fill the template a
**How to post a meaningful bug report** **How to post a meaningful bug report**
1. *Read this whole template first.* 1. *Read this whole template first.*
2. *Determine if you are on the right place:* 2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to lufi itself. Refer to its documentation or repository for help.* - *Otherwise, the issue may be due to Lufi itself. Refer to its documentation or repository for help.*
- *If you have a doubt, post here, we will figure it out together.* - *If you have a doubt, post here, we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.* 3. *Delete the italic comments as you write over them below, and remove this guide.*
--- ---
@ -20,7 +20,7 @@ about: Create a report to help us debug, it would be nice to fill the template a
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x - YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* - Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain: - If yes, please explain:
- Using, or trying to install package version/branch: - Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
@ -34,8 +34,8 @@ about: Create a report to help us debug, it would be nice to fill the template a
- *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:* - *If the error occurs in your browser, explain what you did:*
1. *Go to '...'* 1. *Go to '...'*
2. *Click on '....'* 2. *Click on '...'*
3. *Scroll down to '....'* 3. *Scroll down to '...'*
4. *See error* 4. *See error*
**Expected behavior** **Expected behavior**

View file

@ -6,7 +6,7 @@
"en": "Self hosting files and sharing anonymous application", "en": "Self hosting files and sharing anonymous application",
"fr": "Application d'hébergement et de partage de fichiers anonyme" "fr": "Application d'hébergement et de partage de fichiers anonyme"
}, },
"version": "0.03.5~ynh2", "version": "0.05.9~ynh1",
"url": "https://git.framasoft.org/luc/lufi", "url": "https://git.framasoft.org/luc/lufi",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {
@ -14,7 +14,7 @@
"email": "win10@tutanota.com, cyp@rouquin.me" "email": "win10@tutanota.com, cyp@rouquin.me"
}, },
"requirements": { "requirements": {
"yunohost": ">= 3.5" "yunohost": ">= 4.0.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
# dependencies used by the app # dependencies used by the app
pkg_dependencies="build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev postgresql cpanminus" pkg_dependencies="build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev postgresql carton"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -34,7 +34,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#================================================= #=================================================
# DECLARE DATA AND CONF FILES TO BACKUP # DECLARE DATA AND CONF FILES TO BACKUP
#================================================= #=================================================
ynh_print_info --message="Declaring files to be backed up..." ynh_print_info --message="Declaring files to be backed up..."
#================================================= #=================================================

View file

@ -41,7 +41,7 @@ max_file_size=$(ynh_app_setting_get --app=$app --key=max_file_size)
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -83,23 +83,23 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="$final_path/l
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating nginx web server configuration..." ynh_script_progression --message="Updating NGINX web server configuration..."
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
# Change the path in the nginx config file # Change the path in the NGINX config file
if [ $change_path -eq 1 ] if [ $change_path -eq 1 ]
then then
# Make a backup of the original nginx config file if modified # Make a backup of the original NGINX config file if modified
ynh_backup_if_checksum_is_different --file="$nginx_conf_path" ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
# Set global variables for nginx helper # Set global variables for NGINX helper
domain="$old_domain" domain="$old_domain"
path_url="$new_path" path_url="$new_path"
# Create a dedicated nginx config # Create a dedicated NGINX config
ynh_add_nginx_config max_file_size ynh_add_nginx_config max_file_size
fi fi
# Change the domain for nginx # Change the domain for NGINX
if [ $change_domain -eq 1 ] if [ $change_domain -eq 1 ]
then then
# Delete file checksum for the old conf file location # Delete file checksum for the old conf file location
@ -170,7 +170,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -39,9 +39,6 @@ ynh_script_progression --message="Validating installation parameters..."
final_path=/var/www/$app final_path=/var/www/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder" test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Normalize the url path syntax
path_url=$(ynh_normalize_url_path --path_url=$path_url)
# Check if max_file_size is a number # Check if max_file_size is a number
if ! [[ $max_file_size =~ "^[\-0-9]+$" ]] && [ $max_file_size -lt 0 ]; then if ! [[ $max_file_size =~ "^[\-0-9]+$" ]] && [ $max_file_size -lt 0 ]; then
ynh_die --message="Max file must be a number positive or zero" ynh_die --message="Max file must be a number positive or zero"
@ -74,13 +71,6 @@ ynh_script_progression --message="Configuring firewall..."
port=$(ynh_find_port --port=8095) port=$(ynh_find_port --port=8095)
ynh_app_setting_set --app=$app --key=port --value=$port ynh_app_setting_set --app=$app --key=port --value=$port
# Optional: Expose this port publicly
# (N.B. : you only need to do this if the app actually needs to expose the port publicly.
# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !)
# Open the port
# ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
@ -88,9 +78,6 @@ ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
# Install Carton
echo yes | cpanm Carton
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE
#================================================= #=================================================
@ -116,9 +103,9 @@ ynh_setup_source --dest_dir="$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring nginx web server..." ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated nginx config # Create a dedicated NGINX config
ynh_add_nginx_config max_file_size ynh_add_nginx_config max_file_size
#================================================= #=================================================
@ -134,7 +121,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# CONFIGURE LUFI # CONFIGURE LUFI
#================================================= #=================================================
ynh_script_progression --message="Configuring lufi..." ynh_script_progression --message="Configuring $app..."
config=${final_path}/lufi.conf config=${final_path}/lufi.conf
cp ../conf/lufi.conf.template "$config" cp ../conf/lufi.conf.template "$config"
@ -162,7 +149,7 @@ ynh_store_file_checksum --file="$config"
#================================================= #=================================================
# INSTALL LUFI # INSTALL LUFI
#================================================= #=================================================
ynh_script_progression --message="Installing lufi..." ynh_script_progression --message="Installing $app..."
pushd $final_path pushd $final_path
carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test
@ -209,7 +196,7 @@ ynh_use_logrotate
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description "Lufi service" --log "$final_path/log/production.log" yunohost service add $app --description="Lufi service" --log="$final_path/log/production.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
@ -239,7 +226,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -28,7 +28,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# REMOVE SERVICE INTEGRATION IN YUNOHOST # REMOVE SERVICE INTEGRATION IN YUNOHOST
#================================================= #=================================================
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service..." ynh_script_progression --message="Removing $app service..."
@ -70,9 +70,9 @@ ynh_secure_remove --file="$final_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing nginx web server configuration..." ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated nginx config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#================================================= #=================================================

View file

@ -49,7 +49,7 @@ test ! -d $final_path \
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the nginx configuration..." ynh_script_progression --message="Restoring NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -86,9 +86,6 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
# Install Carton
echo yes | cpanm Carton
#================================================= #=================================================
# RESTORE THE POSTGRESQL DATABASE # RESTORE THE POSTGRESQL DATABASE
#================================================= #=================================================
@ -104,14 +101,14 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
ynh_script_progression --message="Restoring the systemd configuration..." ynh_script_progression --message="Restoring the systemd configuration..."
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service systemctl enable $app.service --quiet
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description "lufi service" --log "$final_path/log/production.log" yunohost service add $app --description="Lufi service" --log="$final_path/log/production.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
@ -139,7 +136,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -105,7 +105,7 @@ fi
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config max_file_size ynh_add_nginx_config max_file_size
@ -211,7 +211,7 @@ chmod +x $final_path/script/lufi
#================================================= #=================================================
ynh_script_progression --message="Storing the config file checksum..." ynh_script_progression --message="Storing the config file checksum..."
yunohost service add $app --description "lufi service" --log "$final_path/log/production.log" yunohost service add $app --description="Lufi service" --log="$final_path/log/production.log"
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE
@ -266,7 +266,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload