Only attempt to start amplify agent if amplify key is set
This commit is contained in:
parent
730920e861
commit
433f979898
|
@ -60,16 +60,17 @@ if [ -n "${api_key}" -o -n "${amplify_imagename}" ]; then
|
||||||
chown nginx ${nginx_status_conf} > /dev/null 2>&1
|
chown nginx ${nginx_status_conf} > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep '^api_key.*=[ ]*[[:alnum:]].*' ${agent_conf_file} > /dev/null 2>&1; then
|
if ! grep '^api_key.*=[ ]*[[:alnum:]].*' ${agent_conf_file} > /dev/null 2>&1;
|
||||||
echo "no api_key found in ${agent_conf_file}! exiting."
|
then
|
||||||
fi
|
echo "no api_key found in ${agent_conf_file}! Skipping amplify agent."
|
||||||
|
else
|
||||||
|
echo "starting amplify-agent ..."
|
||||||
|
service amplify-agent start > /dev/null 2>&1 < /dev/null
|
||||||
|
|
||||||
echo "starting amplify-agent ..."
|
if [ $? != 0 ]; then
|
||||||
service amplify-agent start > /dev/null 2>&1 < /dev/null
|
echo "couldn't start the agent, please check ${agent_log_file}"
|
||||||
|
exit 1
|
||||||
if [ $? != 0 ]; then
|
fi
|
||||||
echo "couldn't start the agent, please check ${agent_log_file}"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait ${nginx_pid}
|
wait ${nginx_pid}
|
||||||
|
|
Loading…
Reference in New Issue