[Fix] Check runner sock already running only when starting

This commit is contained in:
samuel 2023-05-09 15:23:43 +02:00
parent d204aec2a6
commit 734bbb8ecf
1 changed files with 4 additions and 4 deletions

View File

@ -433,10 +433,6 @@ main() (
fail "Directory of runner_sock='${runner_sock}' is not writable." \
"${err_runner_sock_dir_not_writable}"
fi
if [ -e "${runner_sock}" ]; then
fail "Sock deployer_sock='${runner_sock}' is already in use." \
"${err_runner_sock_already_in_use}"
fi
if [ -z "${runner_cloning_dir}" ]; then
fail "Variable runner_cloning_dir is empty." \
@ -511,6 +507,10 @@ main() (
fail "Sock deployer_sock='${deployer_sock}' does not exist." \
"${err_deployer_sock_not_exist}"
fi
if [ -e "${runner_sock}" ]; then
fail "Sock deployer_sock='${runner_sock}' is already in use." \
"${err_runner_sock_already_in_use}"
fi
# Set right access in background after nc listen.
(