mirror of
https://github.com/YunoHost-Apps/gitlab-runner_ynh.git
synced 2024-09-03 19:15:58 +02:00
fix https://github.com/YunoHost-Apps/gitlab-runner_ynh/issues/104, start the docker service if it's not active
This commit is contained in:
parent
203bfba89a
commit
74c24d929c
2 changed files with 10 additions and 0 deletions
|
@ -46,6 +46,11 @@ ynh_app_setting_set --app=$app --key=executor --value=$executor
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..."
|
ynh_script_progression --message="Setting up source files..."
|
||||||
|
|
||||||
|
# Make sure docker is running before installing gitlab-runner
|
||||||
|
if ! systemctl is-active --quiet docker; then
|
||||||
|
ynh_systemd_action --service_name=docker --action=restart --line_match="API listen on /run/docker.sock"
|
||||||
|
fi
|
||||||
|
|
||||||
tempdir="$(mktemp -d)"
|
tempdir="$(mktemp -d)"
|
||||||
ynh_setup_source --dest_dir=$tempdir
|
ynh_setup_source --dest_dir=$tempdir
|
||||||
dpkg -i $tempdir/gitlab-runner.deb
|
dpkg -i $tempdir/gitlab-runner.deb
|
||||||
|
|
|
@ -32,6 +32,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
|
# Make sure docker is running before installing gitlab-runner
|
||||||
|
if ! systemctl is-active --quiet docker; then
|
||||||
|
ynh_systemd_action --service_name=docker --action=restart --line_match="API listen on /run/docker.sock"
|
||||||
|
fi
|
||||||
|
|
||||||
tempdir="$(mktemp -d)"
|
tempdir="$(mktemp -d)"
|
||||||
ynh_setup_source --dest_dir=$tempdir
|
ynh_setup_source --dest_dir=$tempdir
|
||||||
dpkg -i $tempdir/gitlab-runner.deb
|
dpkg -i $tempdir/gitlab-runner.deb
|
||||||
|
|
Loading…
Add table
Reference in a new issue