diff --git a/scripts/install b/scripts/install index 3bd7854..42496f9 100755 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,11 @@ ynh_app_setting_set --app=$app --key=executor --value=$executor #================================================= 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)" ynh_setup_source --dest_dir=$tempdir dpkg -i $tempdir/gitlab-runner.deb diff --git a/scripts/upgrade b/scripts/upgrade index 9cb9f94..eb7a6c9 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,6 +32,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then 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)" ynh_setup_source --dest_dir=$tempdir dpkg -i $tempdir/gitlab-runner.deb