From c340f34754c97e96f60354c013bc95a96273f055 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:13:38 -0500 Subject: [PATCH 1/2] Update update-telegraf-w-keys.sh --- telegraf-setup-scripts/update-telegraf-w-keys.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/telegraf-setup-scripts/update-telegraf-w-keys.sh b/telegraf-setup-scripts/update-telegraf-w-keys.sh index 4350e3d..c632b42 100644 --- a/telegraf-setup-scripts/update-telegraf-w-keys.sh +++ b/telegraf-setup-scripts/update-telegraf-w-keys.sh @@ -7,8 +7,13 @@ TOKEN_FILE="/run/secrets/${HOSTNAME}" if [[ -r "$TOKEN_FILE" ]]; then TOKEN="$(sudo cat "$TOKEN_FILE")" else - echo "[✗] Docker secret $TOKEN_FILE not found or unreadable." >&2 - exit 1 + echo "[!] Docker secret $TOKEN_FILE not found or unreadable." >&2 + read -rsp "Enter InfluxDB token: " TOKEN + echo + if [[ -z "$TOKEN" ]]; then + echo "[✗] No token provided. Exiting." >&2 + exit 1 + fi fi BUCKET="Home_Network" ORG="Home Network" @@ -41,7 +46,7 @@ EOF fi echo "[+] Checking for Docker plugin..." -if ! sudo grep -q '^\s*\[\[inputs.docker\]\]' "$TELEGRAF_CONF"; then +if ! grep -q '^\s*\[\[inputs.docker\]\]' "$TELEGRAF_CONF"; then cat < /dev/null [[inputs.docker]] From e9f620dc6434edb8efacb2670deedc258fafadba Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:22:24 -0500 Subject: [PATCH 2/2] Deleted some Files --- .github/workflows/code-check.yml | 50 -------------------------------- .vscode/launch.json | 10 ------- .vscode/tasks.json | 16 ---------- 3 files changed, 76 deletions(-) delete mode 100644 .github/workflows/code-check.yml delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/tasks.json diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml deleted file mode 100644 index 664b129..0000000 --- a/.github/workflows/code-check.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Code Quality Check - -on: - push: - paths: - - '**.py' - - '**.sh' - pull_request: - paths: - - '**.py' - - '**.sh' - -jobs: - lint-python: - name: Python Code Linting - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: Install Python linters - run: | - pip install black flake8 - - - name: Run black - run: black --check . - - - name: Run flake8 - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - - lint-shell: - name: Shell Script Linting - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install shellcheck - run: sudo apt-get install -y shellcheck - - - name: Run shellcheck - run: | - find . -type f -name "*.sh" -exec shellcheck {} + \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 9dae3d4..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - - - ] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index fc65b84..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "type": "markdownlint", - "problemMatcher": [ - "$markdownlint" - ], - "label": "markdownlint: Lint all Markdown files in the workspace with markdownlint", - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} \ No newline at end of file