diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..5557eae --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "Bash(git add:*)" + ], + "deny": [], + "ask": [] + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6f249aa..23d981c 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,4 @@ userprofiles/*/ # Claude Code spezifische Dateien CLAUDE.md -.claude/ \ No newline at end of file +.claude/ diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..468ed39 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,97 @@ +# 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// +├── .sh # The actual script +└── README.md # Documentation and examples +``` + +## Development Commands + +### Adding New Scripts + +```bash +# 1. Create folder structure (legacy or wh20) +mkdir -p legacy/ + +# 2. Add script and make executable +chmod +x legacy//.sh + +# 3. Copy and adapt documentation template +cp README_template.md legacy//README.md + +# 4. Update platform README +# Edit legacy/README.md or wh20/README.md +``` + +### Testing Scripts + +```bash +# 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 + +```bash +# Commit changes +git add . +git commit -m "Add to " +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 `, `go mx `, `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 \ No newline at end of file