Uploaded image for project: 'ProxySQL and Admin Scripts'
  1. ProxySQL and Admin Scripts
  2. PSQLADM-157

Check for file existing & readable before trying to cat it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.7
    • Component/s: None
    • Labels:
      None

      Description

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

      A non-standard file (/var/lib/proxysql/host_priority.conf) is expected to be present but likely to not be present, causing error messages from the cat

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              marcelo.altmann Marcelo Altmann
              Reporter:
              ceri.williams Ceri Williams
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: