1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Use PACKAGE_CHECK_EXEC variable

This commit is contained in:
Kay0u 2019-05-12 00:30:18 +02:00
parent 2145ecc67c
commit 97b0e23484
No known key found for this signature in database
GPG key ID: ABC3F52576D011D3
4 changed files with 3 additions and 11 deletions

View file

@ -6,14 +6,6 @@
pkg_dependencies="openssh-server"
#=================================================
# PACKAGE CHECK BYPASSING...
#=================================================
IS_PACKAGE_CHECK () {
return $(env | grep -c container=lxc)
}
#=================================================
# BOOLEAN CONVERTER
#=================================================

View file

@ -185,7 +185,7 @@ tempdir="$(mktemp -d)"
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
if IS_PACKAGE_CHECK; then
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env
ynh_replace_string --match_string="command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" --replace_string="command \"cat \/etc\/sysctl.conf\"" --target_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb"
ynh_exec_warn_less dpkg --configure gitlab-ce

View file

@ -117,7 +117,7 @@ tempdir="$(mktemp -d)"
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
if IS_PACKAGE_CHECK; then
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env
ynh_replace_string --match_string="command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" --replace_string="command \"cat \/etc\/sysctl.conf\"" --target_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb"
ynh_exec_warn_less dpkg --configure gitlab-ce

View file

@ -254,7 +254,7 @@ then
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
if IS_PACKAGE_CHECK; then
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env
ynh_replace_string --match_string="command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" --replace_string="command \"cat \/etc\/sysctl.conf\"" --target_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb"
ynh_exec_warn_less dpkg --configure gitlab-ce