This commit is contained in:
alessandro
2026-07-17 09:42:52 +02:00
commit 20d506407a
93 changed files with 14526 additions and 0 deletions

27
addworker.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
FILE="$1"
NEW_LINE="$2"
if [[ ! -f "$FILE" ]]; then
echo "❌ File not found: $FILE"
exit 1
fi
if ! grep -q "^tls-san:" "$FILE"; then
echo "❌ 'tls-san:' not found in $FILE"
exit 1
fi
awk -v newline="$NEW_LINE" '
{
print
if ($0 ~ /^tls-san:/) {
print newline
}
}
' "$FILE" > "${FILE}.tmp" && mv "${FILE}.tmp" "$FILE"
echo "✅ Line added after tls-san:"
echo " $NEW_LINE"