Merge pull request #15 from wickedyoda/configure_telegraf

Update update-telegraf-w-keys.sh
This commit is contained in:
WickedYoda authored and GitHub committed 2025-08-07 15:22:59 -05:00
commit 7f4c4362f7
4 files changed
+8 -79

No files matched your search

-50
View File
@@ -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 {} +
-10
View File
@@ -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": [
]
}
-16
View File
@@ -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
}
}
]
}
@@ -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 <<EOF | sudo tee -a "$TELEGRAF_CONF" > /dev/null
[[inputs.docker]]