diff --git a/check_process b/check_process index 31337ff..2e870a8 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,7 @@ upgrade=1 backup_restore=1 multi_instance=0 - wrong_user=1 + wrong_user=0 wrong_path=1 incorrect_path=1 corrupt_source=0 diff --git a/scripts/backup b/scripts/backup index de4bc01..696b8fc 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,7 @@ #!/bin/bash # causes the shell to exit if any subcommand or pipeline returns a non-zero status -set -e +set -eu # Source YNH helpers source /usr/share/yunohost/helpers @@ -9,7 +9,7 @@ source /usr/share/yunohost/helpers app="jappix" # Retrieve app settings -domain=$(sudo yunohost app setting "$app" domain) +domain=$(ynh_app_setting_set "$app" domain) # Save sources & data ynh_backup "/var/www/${app}" "sources" diff --git a/scripts/install b/scripts/install index 37dcd8d..6053e23 100644 --- a/scripts/install +++ b/scripts/install @@ -6,6 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= +set -eu source .fonctions source /usr/share/yunohost/helpers diff --git a/scripts/remove b/scripts/remove index c9400c2..81aaaa8 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,5 +1,6 @@ #!/bin/bash +set -u source /usr/share/yunohost/helpers app="jappix" diff --git a/scripts/upgrade b/scripts/upgrade index 23eeee7..a38e177 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -eu source .fonctions source /usr/share/yunohost/helpers @@ -12,12 +12,6 @@ path=$(ynh_app_setting_get $app path) name=$(ynh_app_setting_get "$app" name) language=$(ynh_app_setting_get "$app" language) -# Retrieve arguments -domain=$(ynh_app_setting_set "$app" domain) -path=$(ynh_app_setting_set "$app" path) -name=$(ynh_app_setting_set "$app" name) -language=$(ynh_app_setting_set "$app" language) - # Set default values name="${name:-YunoJappix}" language="${language:-en}"