Commit 90a35359 authored by Kamil Trzciński's avatar Kamil Trzciński 🔴

Fix installation scripts

parent 087ee7c9
......@@ -13,7 +13,7 @@ done
# create user if doesn't exist: it will create gitlab_runner if not found
if ! id -u "$USER" >/dev/null 2>/dev/null; then
echo "GitLab Runner: creating $USER..."
useradd --comment 'GitLab Runner' --create-home $USER
useradd --shell /bin/bash --comment 'GitLab Runner' --create-home $USER
fi
# add user to docker group to allow Docker access (insecure)
......@@ -34,8 +34,8 @@ if [ -f $HOMEDIR/config.toml ] && [ ! -f /etc/gitlab-runner/config.toml ]; then
fi
# uninstall old service
gitlab-ci-multi-runner stop --service "gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner uninstall --service "gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner stop --service="gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner uninstall --service="gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
# re-register runner
gitlab-ci-multi-runner stop >/dev/null 2>/dev/null || :
......@@ -43,4 +43,4 @@ gitlab-ci-multi-runner uninstall >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner install --user=$USER --working-directory=$HOMEDIR
# start runner service
service gitlab-runner start || :
gitlab-ci-multi-runner start || :
#!/bin/sh
set -e
gitlab-ci-multi-runner stop || :
gitlab-ci-multi-runner uninstall || :
gitlab-ci-multi-runner stop >/dev/null 2>/dev/null
gitlab-ci-multi-runner uninstall >/dev/null 2>/dev/null
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment