Files
esn-support-bash-snippets/CLAUDE.md
T
h0tznpl0tzandClaude 9ae5a85e02 Neue Connect-Tools Kategorie und umfassende Dokumentation hinzugefügt
- go.sh SSH-Shortcut Tool mit vollständiger Dokumentation
- Neue Connect-Kategorie für Verbindungstools
- Umfassende .gitignore mit rekursiven Mustern
- CLAUDE.md für zukünftige Claude Code Instanzen
- README-Updates für bessere Navigation

Die Connect-Tools vereinfachen SSH-Verbindungen zu easyname-Servern
mit Kerberos-Auth und unterstützen Web-, MX-, Logger- und Support-Server.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 12:24:22 +02:00

2.9 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

Collection of Bash scripts for easyname Support Team - small helpers for log analysis, automations, and typical support cases. Repository is internal for easyname Support.

Architecture

Scripts are organized by platform:

  • legacy/ - Scripts for Legacy infrastructure (contains checkms, quicknav)
  • wh20/ - Scripts for WH20 infrastructure (currently empty, placeholder for future scripts)
  • connect/ - Connection utilities (contains go SSH shortcut script)
  • userprofiles/ - User-specific configuration files

Each script follows a modular structure:

platform/<scriptname>/
├── <scriptname>.sh    # The actual script
└── README.md          # Documentation and examples

Development Commands

Adding New Scripts

# 1. Create folder structure (legacy or wh20)
mkdir -p legacy/<scriptname>

# 2. Add script and make executable
chmod +x legacy/<scriptname>/<scriptname>.sh

# 3. Copy and adapt documentation template
cp README_template.md legacy/<scriptname>/README.md

# 4. Update platform README
# Edit legacy/README.md or wh20/README.md

Testing Scripts

# Test checkms (MS error code analysis)
./legacy/checkms/checkms.sh --help
./legacy/checkms/checkms.sh --show-config
./legacy/checkms/checkms.sh 2024-01-15

# Test go SSH shortcuts
./connect/go/go.sh web 42
./connect/go/go.sh mx 12

Git Operations

# Commit changes
git add .
git commit -m "Add <scriptname> to <legacy|wh20>"
git push origin main

Core Scripts

checkms - Microsoft SMTP Error Analysis

  • Analyzes Microsoft-specific SMTP error codes (S3150, S775, S7771*) in Exim logs
  • Config stored in ~/.config/checkms/checkms.conf
  • Can add/remove error codes dynamically
  • Supports time-based filtering (--minutes, --hours)

go - SSH Connection Shortcuts

  • Requires LUSER environment variable set
  • Commands: go web <NR>, go mx <NR>, go logger, go support, go kinit
  • Supports remote command execution with -- separator
  • Special handling for easyuser connections on web servers

quicknav - Legacy Navigation Function

  • Simple bash function for quick SSH connections
  • Must be sourced in .bashrc/.zshrc
  • Requires manual configuration of LUSER variable

Environment Requirements

  • LUSER: Required environment variable for authentication (format: username)
  • SSH Access: Must have Kerberos authentication set up (kinit)
  • Target Hosts:
    • web*.in.easyname.com
    • mx*.in.easyname.com
    • logger.in.nessus.at
    • support.in.easyname.com

Configuration Files

  • checkms uses JSON config at ~/.config/checkms/checkms.conf
  • User profiles stored in userprofiles/ directory
  • .bashrc example available with history settings and prompt configuration