diff --git a/CHANGELOG.md b/CHANGELOG.md
index 416ed08..80f6cb1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,11 @@
Changelog
=========
-## Unreleased
-- Nothing for now...
+## [0.12.1~ynh1](https://github.com/YunoHost-Apps/lutim_ynh/pull/46) - 2020-10-18
+
+#### Changed
+* [Update to Lutim 0.12.1](https://github.com/YunoHost-Apps/lutim_ynh/pull/52)
+
## [0.11.6~ynh4](https://github.com/YunoHost-Apps/lutim_ynh/pull/46) - 2020-04-25
diff --git a/README.md b/README.md
index b9d2ec3..5af2e80 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
Lutim stores images and allows you to see them, download them or share them on social networks.
Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year.
-**Shipped version:** 0.11.6
+**Shipped version:** 0.12.1
## Screenshots
@@ -23,13 +23,13 @@ Images are indefinitely stored unless you request that they will be deleted at f
## Configuration
-Edit the file `/var/www/lutim/lutim.conf` to edit the configuration of Lutim.
+Edit the file `/var/www/lutim/lutim.conf` to configure Lutim.
Then reload the lutim service.
## Documentation
* Official documentation: https://framagit.org/luc/lutim/wikis/home
- * YunoHost documentation: There no other documentations, feel free to contribute.
+ * YunoHost documentation: https://yunohost.org/#/app_lutim
## YunoHost specific features
@@ -39,9 +39,8 @@ Not relevant.
#### Supported architectures
-* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/lutim/)
+* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/lutim/)
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/lutim/)
-* Buster x86-64b - [](https://ci-buster.nohost.me/ci/apps/lutim/)
## Limitations
@@ -56,8 +55,7 @@ Not relevant.
---
-Developers infos
-----------------
+## Developers infos
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing).
diff --git a/README_fr.md b/README_fr.md
index 6e4cda1..79725c0 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -8,12 +8,12 @@
> *Ce package vous permet d'installer Lutim rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.*
-## Résumé
+## Vue d'ensemble
Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux.
Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an.
-**Version embarquée:** 0.11.6
+**Version embarquée :** 0.12.1
## Captures d'écran
@@ -23,13 +23,13 @@ Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles
## Configuration
-Editez le fichier `/var/www/lutim/lutim.conf` pour éditer la configuration de Lutim.
-Rechargez ensuite le service lutim.
+Éditez le fichier `/var/www/lutim/lutim.conf` pour configurer Lutim.
+Rechargez ensuite le service Lutim.
## Documentation
- * Documentation officielle: https://framagit.org/luc/lutim/wikis/home
- * Documentation YunoHost: Il n'y a pas d'autre documentation, n'hésitez pas à contribuer.
+ * Documentation officielle : https://framagit.org/luc/lutim/wikis/home
+ * Documentation YunoHost : https://yunohost.org/#/app_lutim_fr
## Fonctionnalités spécifiques à YunoHost
@@ -39,9 +39,8 @@ Non applicable.
#### Architectures supportées.
-* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/lutim/)
+* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/lutim/)
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/lutim/)
-* Buster x86-64b - [](https://ci-buster.nohost.me/ci/apps/lutim/)
## Limitations
@@ -49,15 +48,14 @@ Non applicable.
## Liens
- * Reporter un bug: https://github.com/YunoHost-Apps/lutim_ynh/issues
- * Site de Lutim: https://lut.im/
- * Dépôt de Lutim: https://framagit.org/fiat-tux/hat-softwares/lutim
- * Site de YunoHost: https://yunohost.org/
+ * Reporter un bug : https://github.com/YunoHost-Apps/lutim_ynh/issues
+ * Site de Lutim : https://lut.im/
+ * Dépôt de Lutim : https://framagit.org/fiat-tux/hat-softwares/lutim
+ * Site de YunoHost : https://yunohost.org/
---
-Informations à l'intention des développeurs
-----------------
+## Informations à l'intention des développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing).
diff --git a/conf/app.src b/conf/app.src
index ab8ab41..11db593 100644
--- a/conf/app.src
+++ b/conf/app.src
@@ -1,6 +1,6 @@
-SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.11.6/lutim-0.11.6.tar.gz
-SOURCE_SUM=092fc5b914fc8a2dd46f7101fe94c493
-SOURCE_SUM_PRG=md5sum
+SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.1/lutim-0.12.1.tar.gz
+SOURCE_SUM=141f142d47e3a8367e0c292304ddbecfc34b49ae7e561e2c3526000040318973
+SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
diff --git a/conf/systemd.service b/conf/systemd.service
index 7085887..9e9b08b 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -3,10 +3,9 @@ Description=Image hosting and sharing service
After=network.target
[Service]
-Type=simple
+Type=forking
User=__APP__
Group=__APP__
-RemainAfterExit=yes
WorkingDirectory=__FINALPATH__/
PIDFile=__FINALPATH__/script/hypnotoad.pid
ExecStart=/usr/bin/carton exec hypnotoad script/lutim >> /var/log/lutim/production.log 2>&1
diff --git a/config_panel.toml b/config_panel.toml
index 2dc90df..b24d3b3 100644
--- a/config_panel.toml
+++ b/config_panel.toml
@@ -8,7 +8,7 @@ name = "Lutim configuration"
name = "Lutim configuration"
[main.configuration.always_encrypt]
- ask = "Force the encryption of images ?"
+ ask = "Force the encryption of images?"
type = "boolean"
default = true
@@ -28,19 +28,19 @@ name = "Lutim configuration"
name = "Overwriting config files"
[main.overwrite_files.overwrite_settings]
- ask = "Overwrite the config file lutim.conf ?"
+ ask = "Overwrite the config file lutim.conf?"
type = "boolean"
default = true
help = "If the file is overwritten, a backup will be created."
[main.overwrite_files.overwrite_nginx]
- ask = "Overwrite the nginx config file ?"
+ ask = "Overwrite the nginx config file?"
type = "boolean"
default = true
help = "If the file is overwritten, a backup will be created."
[main.overwrite_files.overwrite_systemd]
- ask = "Overwrite the systemd config file ?"
+ ask = "Overwrite the systemd config file?"
type = "boolean"
default = true
help = "If the file is overwritten, a backup will be created."
@@ -49,7 +49,7 @@ name = "Lutim configuration"
name = "Global configuration"
[main.global_config.email_type]
- ask = "Send HTML email to admin ?"
+ ask = "Send HTML email to admin?"
type = "boolean"
default = true
help = "Allow app scripts to send HTML mails instead of plain text."
diff --git a/manifest.json b/manifest.json
index f46c2a4..8e01235 100644
--- a/manifest.json
+++ b/manifest.json
@@ -6,7 +6,7 @@
"en": "Self hosting images and sharing anonymous application",
"fr": "Application d'hébergement et de partage d'images anonyme"
},
- "version": "0.11.6~ynh4",
+ "version": "0.12.1~ynh1",
"url": "https://lut.im",
"license": "AGPL-3.0",
"maintainer": {
@@ -18,7 +18,7 @@
"email": "maniackc_dev@crudelis.fr"
}],
"requirements": {
- "yunohost": ">= 3.7"
+ "yunohost": ">= 3.8.1"
},
"multi_instance": false,
"services": [
@@ -54,7 +54,8 @@
},
"default": false,
"help": {
- "en": "If you set Lutim as public, everyone will be able to upload images and share them.
But even if not public, everyone can see an image from a link shared with your Lutim."
+ "en": "If you set Lutim as public, everyone will be able to upload images and share them.
But even if not public, everyone can see an image from a link shared with your Lutim.",
+ "fr": "Si vous définissez Lutim comme public, tout le monde pourra télécharger des images et les partager.
Mais même si ce n'est pas public, tout le monde peut voir une image à partir d'un lien partagé avec votre Lutim."
}
},
{
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 3770c0f..85f7a0c 100755
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -1,9 +1,11 @@
#!/bin/bash
#=================================================
-# PERSONAL HELPERS
+# COMMON VARIABLES
#=================================================
+pkg_depencencies="carton perlmagick libpq-dev shared-mime-info"
+
#=================================================
# BACKUP
#=================================================
@@ -265,27 +267,27 @@ __PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/service
#=================================================
-ynh_debian_release () {
- lsb_release --codename --short
-}
+# ynh_debian_release () {
+# lsb_release --codename --short
+# }
-is_stretch () {
- if [ "$(ynh_debian_release)" == "stretch" ]
- then
- return 0
- else
- return 1
- fi
-}
+# is_stretch () {
+# if [ "$(ynh_debian_release)" == "stretch" ]
+# then
+# return 0
+# else
+# return 1
+# fi
+# }
-is_jessie () {
- if [ "$(ynh_debian_release)" == "jessie" ]
- then
- return 0
- else
- return 1
- fi
-}
+# is_jessie () {
+# if [ "$(ynh_debian_release)" == "jessie" ]
+# then
+# return 0
+# else
+# return 1
+# fi
+# }
#=================================================
@@ -579,160 +581,6 @@ ynh_check_ram () {
fi
}
-#=================================================
-
-# Define the values to configure php-fpm
-#
-# usage: ynh_get_scalable_phpfpm --usage=usage --footprint=footprint [--print]
-# | arg: -f, --footprint - Memory footprint of the service (low/medium/high).
-# low - Less than 20Mb of ram by pool.
-# medium - Between 20Mb and 40Mb of ram by pool.
-# high - More than 40Mb of ram by pool.
-# Or specify exactly the footprint, the load of the service as Mb by pool instead of having a standard value.
-# To have this value, use the following command and stress the service.
-# watch -n0.5 ps -o user,cmd,%cpu,rss -u APP
-#
-# | arg: -u, --usage - Expected usage of the service (low/medium/high).
-# low - Personal usage, behind the sso.
-# medium - Low usage, few people or/and publicly accessible.
-# high - High usage, frequently visited website.
-#
-# | arg: -p, --print - Print the result
-#
-#
-#
-# The footprint of the service will be used to defined the maximum footprint we can allow, which is half the maximum RAM.
-# So it will be used to defined 'pm.max_children'
-# A lower value for the footprint will allow more children for 'pm.max_children'. And so for
-# 'pm.start_servers', 'pm.min_spare_servers' and 'pm.max_spare_servers' which are defined from the
-# value of 'pm.max_children'
-# NOTE: 'pm.max_children' can't exceed 4 times the number of processor's cores.
-#
-# The usage value will defined the way php will handle the children for the pool.
-# A value set as 'low' will set the process manager to 'ondemand'. Children will start only if the
-# service is used, otherwise no child will stay alive. This config gives the lower footprint when the
-# service is idle. But will use more proc since it has to start a child as soon it's used.
-# Set as 'medium', the process manager will be at dynamic. If the service is idle, a number of children
-# equal to pm.min_spare_servers will stay alive. So the service can be quick to answer to any request.
-# The number of children can grow if needed. The footprint can stay low if the service is idle, but
-# not null. The impact on the proc is a little bit less than 'ondemand' as there's always a few
-# children already available.
-# Set as 'high', the process manager will be set at 'static'. There will be always as many children as
-# 'pm.max_children', the footprint is important (but will be set as maximum a quarter of the maximum
-# RAM) but the impact on the proc is lower. The service will be quick to answer as there's always many
-# children ready to answer.
-ynh_get_scalable_phpfpm () {
- local legacy_args=ufp
- # Declare an array to define the options of this helper.
- declare -Ar args_array=( [u]=usage= [f]=footprint= [p]=print )
- local usage
- local footprint
- local print
- # Manage arguments with getopts
- ynh_handle_getopts_args "$@"
- # Set all characters as lowercase
- footprint=${footprint,,}
- usage=${usage,,}
- print=${print:-0}
-
- if [ "$footprint" = "low" ]
- then
- footprint=20
- elif [ "$footprint" = "medium" ]
- then
- footprint=35
- elif [ "$footprint" = "high" ]
- then
- footprint=50
- fi
-
- # Define the way the process manager handle child processes.
- if [ "$usage" = "low" ]
- then
- php_pm=ondemand
- elif [ "$usage" = "medium" ]
- then
- php_pm=dynamic
- elif [ "$usage" = "high" ]
- then
- php_pm=static
- else
- ynh_die --message="Does not recognize '$usage' as an usage value."
- fi
-
- # Get the total of RAM available, except swap.
- local max_ram=$(ynh_check_ram --no_swap)
-
- less0() {
- # Do not allow value below 1
- if [ $1 -le 0 ]
- then
- echo 1
- else
- echo $1
- fi
- }
-
- # Define pm.max_children
- # The value of pm.max_children is the total amount of ram divide by 2 and divide again by the footprint of a pool for this app.
- # So if php-fpm start the maximum of children, it won't exceed half of the ram.
- php_max_children=$(( $max_ram / 2 / $footprint ))
- # If process manager is set as static, use half less children.
- # Used as static, there's always as many children as the value of pm.max_children
- if [ "$php_pm" = "static" ]
- then
- php_max_children=$(( $php_max_children / 2 ))
- fi
- php_max_children=$(less0 $php_max_children)
-
- # To not overload the proc, limit the number of children to 4 times the number of cores.
- local core_number=$(nproc)
- local max_proc=$(( $core_number * 4 ))
- if [ $php_max_children -gt $max_proc ]
- then
- php_max_children=$max_proc
- fi
-
- if [ "$php_pm" = "dynamic" ]
- then
- # Define pm.start_servers, pm.min_spare_servers and pm.max_spare_servers for a dynamic process manager
- php_min_spare_servers=$(( $php_max_children / 8 ))
- php_min_spare_servers=$(less0 $php_min_spare_servers)
-
- php_max_spare_servers=$(( $php_max_children / 2 ))
- php_max_spare_servers=$(less0 $php_max_spare_servers)
-
- php_start_servers=$(( $php_min_spare_servers + ( $php_max_spare_servers - $php_min_spare_servers ) /2 ))
- php_start_servers=$(less0 $php_start_servers)
- else
- php_min_spare_servers=0
- php_max_spare_servers=0
- php_start_servers=0
- fi
-
- if [ $print -eq 1 ]
- then
- ynh_debug --message="Footprint=${footprint}Mb by pool."
- ynh_debug --message="Process manager=$php_pm"
- ynh_debug --message="Max RAM=${max_ram}Mb"
- if [ "$php_pm" != "static" ]; then
- ynh_debug --message="\nMax estimated footprint=$(( $php_max_children * $footprint ))"
- ynh_debug --message="Min estimated footprint=$(( $php_min_spare_servers * $footprint ))"
- fi
- if [ "$php_pm" = "dynamic" ]; then
- ynh_debug --message="Estimated average footprint=$(( $php_max_spare_servers * $footprint ))"
- elif [ "$php_pm" = "static" ]; then
- ynh_debug --message="Estimated footprint=$(( $php_max_children * $footprint ))"
- fi
- ynh_debug --message="\nRaw php-fpm values:"
- ynh_debug --message="pm.max_children = $php_max_children"
- if [ "$php_pm" = "dynamic" ]; then
- ynh_debug --message="pm.start_servers = $php_start_servers"
- ynh_debug --message="pm.min_spare_servers = $php_min_spare_servers"
- ynh_debug --message="pm.max_spare_servers = $php_max_spare_servers"
- fi
- fi
-}
#=================================================
diff --git a/scripts/_variables b/scripts/_variables
deleted file mode 100644
index 6510e96..0000000
--- a/scripts/_variables
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-# Dependencies
-app_depencencies="carton perlmagick libpq-dev shared-mime-info"
diff --git a/scripts/backup b/scripts/backup
index d6be7f4..aede58d 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -19,7 +19,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
-ynh_script_progression --message="Loading installation settings..." --weight=2
+ynh_print_info --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
@@ -27,11 +27,13 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
#=================================================
-# STANDARD BACKUP STEPS
+# DECLARE DATA AND CONF FILES TO BACKUP
+#=================================================
+ynh_print_info --message="Declaring files to be backed up..."
+
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
-ynh_script_progression --message="Backing up the main app directory..."
CHECK_SIZE "$final_path"
ynh_backup --src_path="$final_path"
@@ -39,7 +41,6 @@ ynh_backup --src_path="$final_path"
#=================================================
# BACKUP NGINX CONFIGURATION
#=================================================
-ynh_script_progression --message="Backing up nginx web server configuration..."
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@@ -48,21 +49,18 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP LOGROTATE
#=================================================
-ynh_script_progression --message="Backing up logrotate configuration"
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================
-ynh_script_progression --message="Backing up systemd configuration"
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP A CRON FILE
#=================================================
-ynh_script_progression --message="Backing up cron file"
ynh_backup --src_path="/etc/cron.d/$app"
@@ -70,4 +68,4 @@ ynh_backup --src_path="/etc/cron.d/$app"
# END OF SCRIPT
#=================================================
-ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
+ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
diff --git a/scripts/change_url b/scripts/change_url
index 8bb481c..7aa7a5f 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
-ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --weight=20
+ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=20
# Backup the current version of the app
ynh_backup_before_upgrade
@@ -79,21 +79,21 @@ fi
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
-ynh_script_progression --message="Updating nginx web server configuration..." --weight=2
+ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
-# Change the path in the nginx config file
+# 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
+ # Make a backup of the original NGINX config file if modified
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"
path_url="$new_path"
- # Create a dedicated nginx config
+ # Create a dedicated NGINX config
ynh_add_nginx_config
fi
@@ -138,7 +138,7 @@ ynh_replace_string --match_string="\(^ *prefix.*=> '\).*" --replace_string="\1$n
#=================================================
# 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
diff --git a/scripts/install b/scripts/install
index 749c212..b0a75e1 100644
--- a/scripts/install
+++ b/scripts/install
@@ -7,8 +7,6 @@
#=================================================
# Load common variables for all scripts.
-source _variables
-
source _common.sh
source /usr/share/yunohost/helpers
@@ -83,14 +81,14 @@ ynh_setup_source --dest_dir="$final_path"
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=60
-ynh_install_app_dependencies $app_depencencies
+ynh_install_app_dependencies $pkg_depencencies
#=================================================
# NGINX CONFIGURATION
#=================================================
-ynh_script_progression --message="Configuring nginx web server..." --weight=2
+ynh_script_progression --message="Configuring NGINX web server..." --weight=2
-# Create a dedicated nginx config
+# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@@ -106,7 +104,7 @@ ynh_system_user_create $app
#=================================================
# SETUP LUTIM
#=================================================
-ynh_script_progression --message="Configure Lutim" --weight=2
+ynh_script_progression --message="Configure $app" --weight=2
# Configure Lutim
cp ../conf/lutim.conf.template "$final_path/lutim.conf"
@@ -149,7 +147,7 @@ chmod +x $final_path/script/lutim
#=================================================
# INSTALL LUTIM WITH CARTON
#=================================================
-ynh_script_progression --message="Installing Lutim with Carton..." --weight=60
+ynh_script_progression --message="Installing $app with Carton..." --weight=60
mkdir -p /var/log/$app/
(cd $final_path
@@ -225,14 +223,14 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression --message="Reloading nginx web server..." --weight=2
+ynh_script_progression --message="Reloading NGINX web server..." --weight=2
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# CHECK LUTIM BOOTING
#=================================================
-ynh_script_progression --message="Restarting Lutim..." --weight=6
+ynh_script_progression --message="Restarting $app..." --weight=6
# Wait for lutim to be fully started
ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120"
@@ -248,7 +246,7 @@ ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="
# SEND A README FOR THE ADMIN
#=================================================
-# Get main domain and buid the url of the admin panel of the app.
+# Get main domain and buid the URL of the admin panel of the app.
admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
echo "You can find a config file at $final_path/lutim.conf
diff --git a/scripts/remove b/scripts/remove
index 5c04deb..2dab54d 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -51,7 +51,7 @@ ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
-ynh_script_progression --message="Removing app main directory..." --weight=2
+ynh_script_progression --message="Removing $app main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
@@ -59,9 +59,9 @@ ynh_secure_remove --file="$final_path"
#=================================================
# 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
#=================================================
diff --git a/scripts/restore b/scripts/restore
index d522562..b56896d 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -7,8 +7,6 @@
#=================================================
# Load common variables for all scripts.
-source ../settings/scripts/_variables
-
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@@ -62,7 +60,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
-ynh_script_progression --message="Restoring the app main directory..."
+ynh_script_progression --message="Restoring $app main directory..."
ynh_restore_file --origin_path="$final_path"
@@ -88,7 +86,7 @@ chown -R $app: $final_path
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=60
-ynh_install_app_dependencies $app_depencencies
+ynh_install_app_dependencies $pkg_depencencies
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
@@ -130,14 +128,14 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression --message="Reloading nginx web server..." --weight=2
+ynh_script_progression --message="Reloading NGINX web server..." --weight=2
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# START AND CHECK LUTIM BOOTING
#=================================================
-ynh_script_progression --message="Restarting Lutim..." --weight=3
+ynh_script_progression --message="Restarting $app..." --weight=3
# Wait for lutim to be fully started
ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120"
diff --git a/scripts/upgrade b/scripts/upgrade
index 309da4b..67be92a 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -7,8 +7,6 @@
#=================================================
# Load common variables for all scripts.
-source _variables
-
source _common.sh
source /usr/share/yunohost/helpers
@@ -184,7 +182,7 @@ fi
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=9
-ynh_install_app_dependencies $app_depencencies
+ynh_install_app_dependencies $pkg_depencencies
#=================================================
# NGINX CONFIGURATION
@@ -193,7 +191,7 @@ ynh_install_app_dependencies $app_depencencies
# Overwrite the nginx configuration only if it's allowed
if [ $overwrite_nginx -eq 1 ]
then
- ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2
+ ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
ynh_add_nginx_config
fi
@@ -210,7 +208,7 @@ ynh_system_user_create --username=$app
#=================================================
# SETUP LUTIM
#=================================================
-ynh_script_progression --message="Reconfiguring Lutim..."
+ynh_script_progression --message="Reconfiguring $app..."
# Overwrite the settings config file only if it's allowed
if [ $overwrite_settings -eq 1 ]
@@ -274,7 +272,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
- ynh_script_progression --message="Upgrading Lutim with carton..." --weight=4
+ ynh_script_progression --message="Upgrading $app with Carton..." --weight=4
(cd $final_path
carton install 2>&1 | tee -a "/var/log/$app/setup_carton.log")
fi
@@ -299,7 +297,7 @@ chown $app -R /var/log/$app
#=================================================
# 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