mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
Better error handling
This commit is contained in:
parent
4cd3ec5360
commit
73c0dab80e
3 changed files with 6 additions and 3 deletions
|
@ -140,9 +140,10 @@ tempdir="$(mktemp -d)"
|
|||
ynh_setup_source $tempdir $architecture
|
||||
|
||||
if IS_PACKAGE_CHECK; then
|
||||
dpkg -i $tempdir/$gitlab_filename || true # 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
|
||||
else
|
||||
dpkg -i $tempdir/$gitlab_filename
|
||||
fi
|
||||
|
|
|
@ -95,9 +95,10 @@ tempdir="$(mktemp -d)"
|
|||
ynh_setup_source $tempdir $architecture
|
||||
|
||||
if IS_PACKAGE_CHECK; then
|
||||
dpkg -i $tempdir/$gitlab_filename || true # 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
|
||||
else
|
||||
dpkg -i $tempdir/$gitlab_filename
|
||||
fi
|
||||
|
|
|
@ -179,9 +179,10 @@ tempdir="$(mktemp -d)"
|
|||
ynh_setup_source $tempdir $architecture
|
||||
|
||||
if IS_PACKAGE_CHECK; then
|
||||
dpkg -i $tempdir/$gitlab_filename || true # 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
|
||||
else
|
||||
dpkg -i $tempdir/$gitlab_filename
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue