Skip to content

Commit

Permalink
Merge pull request #176 from altmannmarcelo/PSQLADM-157
Browse files Browse the repository at this point in the history
PSQLADM-157 - Check for file existing & readable before trying to cat it
  • Loading branch information
kennt-percona authored Oct 18, 2019
2 parents a17a25e + 95f1114 commit b50cce7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions proxysql-status
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,21 @@ fi

if [[ $DUMP_ALL -eq 1 || $DUMP_FILES -eq 1 ]]; then
if [[ -z $TABLE_FILTER ]]; then
if [[ -r "/var/lib/proxysql/host_priority.conf" ]]; then
echo "............ DUMPING HOST PRIORITY FILE ............"
cat /var/lib/proxysql/host_priority.conf 2>&1
echo "............ END OF DUMPING HOST PRIORITY FILE ............"
echo ""

else
echo "/var/lib/proxysql/host_priority.conf not found or not readble by you!"
fi
echo ""
if [[ -r "/etc/proxysql-admin.cnf" ]]; then
echo "............ DUMPING PROXYSQL ADMIN CNF FILE ............"
cat /etc/proxysql-admin.cnf 2>&1
echo "............ END OF DUMPING PROXYSQL ADMIN CNF FILE ............"
echo ""
else
echo "/etc/proxysql-admin.cnf not found or not readble by you!"
fi
echo ""
fi
fi

0 comments on commit b50cce7

Please sign in to comment.