[Fix] Check deployer socket in use only when starting
This commit is contained in:
parent
f80cf827af
commit
6684563006
|
@ -363,10 +363,6 @@ main() (
|
||||||
fail "Directory of deployer_sock='${deployer_sock}' is not writable." \
|
fail "Directory of deployer_sock='${deployer_sock}' is not writable." \
|
||||||
"${err_deployer_sock_dir_not_writable}"
|
"${err_deployer_sock_dir_not_writable}"
|
||||||
fi
|
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
|
if [ -z "${repos_dir}" ]; then
|
||||||
fail "Variable repos_dir is empty." "${err_repos_dir_empty}"
|
fail "Variable repos_dir is empty." "${err_repos_dir_empty}"
|
||||||
|
@ -415,6 +411,11 @@ main() (
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
start)
|
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.
|
# Set right access in background after nc listen.
|
||||||
(
|
(
|
||||||
inotifywait --timeout 1 --quiet --quiet \
|
inotifywait --timeout 1 --quiet --quiet \
|
||||||
|
|
Loading…
Reference in New Issue