From 17bf4db2cf73cde0af98707370179e3888a9c014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sun, 17 Mar 2019 21:03:20 +0100 Subject: [PATCH] Fix if conditions --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 96b1880..3ac24d4 100644 --- a/scripts/install +++ b/scripts/install @@ -140,7 +140,7 @@ tempdir="$(mktemp -d)" ynh_setup_source $tempdir $architecture if IS_PACKAGE_CHECK; then - if [ ! dpkg -i $tempdir/$gitlab_filename ]; then # This command will fail in lxc env + if ! dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env ynh_replace_string "command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" "command \"cat \/etc\/sysctl.conf\"" "$final_path/embedded/cookbooks/package/resources/sysctl.rb" dpkg --configure gitlab-ce fi diff --git a/scripts/restore b/scripts/restore index 034bc3a..a46ca8d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -95,7 +95,7 @@ tempdir="$(mktemp -d)" ynh_setup_source $tempdir $architecture if IS_PACKAGE_CHECK; then - if [ ! dpkg -i $tempdir/$gitlab_filename ]; then # This command will fail in lxc env + if ! dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env ynh_replace_string "command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" "command \"cat \/etc\/sysctl.conf\"" "$final_path/embedded/cookbooks/package/resources/sysctl.rb" dpkg --configure gitlab-ce fi diff --git a/scripts/upgrade b/scripts/upgrade index b36148d..f08e96f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -179,7 +179,7 @@ tempdir="$(mktemp -d)" ynh_setup_source $tempdir $architecture if IS_PACKAGE_CHECK; then - if [ ! dpkg -i $tempdir/$gitlab_filename ]; then # This command will fail in lxc env + if ! dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env ynh_replace_string "command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" "command \"cat \/etc\/sysctl.conf\"" "$final_path/embedded/cookbooks/package/resources/sysctl.rb" dpkg --configure gitlab-ce fi