diff --git a/src/deployer.sh b/src/deployer.sh index 9d6b50d..aa0d2b4 100755 --- a/src/deployer.sh +++ b/src/deployer.sh @@ -363,10 +363,6 @@ main() ( fail "Directory of deployer_sock='${deployer_sock}' is not writable." \ "${err_deployer_sock_dir_not_writable}" fi - if [ -e "${deployer_sock}" ]; then - fail "Sock deployer_sock='${deployer_sock}' is already in use." \ - "${err_deployer_sock_already_in_use}" - fi if [ -z "${repos_dir}" ]; then fail "Variable repos_dir is empty." "${err_repos_dir_empty}" @@ -415,6 +411,11 @@ main() ( exit 0 ;; start) + if [ -e "${deployer_sock}" ]; then + fail "Sock deployer_sock='${deployer_sock}' is already in use." \ + "${err_deployer_sock_already_in_use}" + fi + # Set right access in background after nc listen. ( inotifywait --timeout 1 --quiet --quiet \