Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check and switch existing logging mode #104

Merged
merged 4 commits into from Oct 10, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Modified telnet command

  • Loading branch information
Ubuntu
Ubuntu committed Oct 3, 2017
commit e4a43909e4b0a5c5ab129ffd2047ef6d4e51e426
@@ -333,7 +333,8 @@ checkIfLogglyServersAccessible()
fi

echo "INFO: Checking if $LOGS_01_HOST is reachable."
if [ $(sleep 1 | telnet $LOGS_01_HOST $LOGGLY_SYSLOG_PORT 2>/dev/null | grep Connected | wc -l) == 1 ]; then
(</dev/tcp/$LOGS_01_HOST/$LOGGLY_SYSLOG_PORT) > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "INFO: $LOGS_01_HOST is reachable."
else
logMsgToConfigSysLog "ERROR" "ERROR: $LOGS_01_HOST is not reachable. Please check your network and firewall settings."
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.