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

Merge pull request #15 from YunoHost-Apps/testing

[fix] pass the CI due to a bug in lxc environment.
This commit is contained in:
bourreP 2019-01-05 00:59:49 +01:00 committed by GitHub
commit 695e9972d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,5 +112,13 @@ setup_source() {
echo "${src_sum} ${src_filename}" | ${src_sumprg} -c --status \
|| ynh_die "Corrupt source"
#Fix for the CI
if sudo grep -qa container=lxc /proc/1/environ;
then
dpkg -i $src_filename || true # This command will fail in lxc env
sed -i 's/command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"/command \"cat \/etc\/sysctl.conf\"/g' $final_path/embedded/cookbooks/package/resources/sysctl.rb
sudo gitlab-ctl reconfigure
else
dpkg -i $src_filename
fi;
}