diff --git a/.env.exemple b/.env.exemple index 20cbf10..ee717ba 100644 --- a/.env.exemple +++ b/.env.exemple @@ -1 +1 @@ -WEBHOOK_URL="https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz" \ No newline at end of file +WEBHOOK_URL="" \ No newline at end of file diff --git a/.gitignore b/.gitignore index e69de29..afdbc42 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,9 @@ +# Secrets / environment +.env +.env.* +!.env.example +!.env.exemple + +# IDE / editor +.idea/ +.vscode/ \ No newline at end of file diff --git a/CheckStorage/check_storage.sh b/CheckStorage/check_storage.sh index 29d7685..e2d8013 100644 --- a/CheckStorage/check_storage.sh +++ b/CheckStorage/check_storage.sh @@ -1,6 +1,7 @@ #!/bin/bash limit=1 -WEBHOOK_URL="https://discord.com/api/webhooks/1479061246903845048/oInyHOf1l7t-jbu9c1lvQDBUxT7m96sUpoDak-V_wjR4IRFi2zz9prC20IKq6cLHF8FO" +# Mettre le lien de votre webhook Discord dans un .env +WEBHOOK_URL=$(grep -E '^WEBHOOK_URL=' .env | cut -d '=' -f2-) usage=$(df -h / | awk 'NR==2 {gsub(/%/,"",$5); print $5}') free=$((100 - usage))