feature/deploy-system #2

Merged
ljp merged 15 commits from feature/deploy-system into main 2025-09-11 17:56:21 +02:00
15 Commits
Author SHA1 Message Date
Philipp Ljubeko 6c0a9749d0 Merge branch 'main' of https://vps.dominikus.one:3443/ljp/esn-support-bash-snippets into feature/deploy-system 2025-09-11 17:38:37 +02:00
Philipp Ljubeko f1f7babfd7 Merge branch 'feature/exitrace-modular' of https://vps.dominikus.one:3443/ljp/esn-support-bash-snippets into feature/deploy-system 2025-09-11 17:09:20 +02:00
h0tznpl0tzandClaude 06647a1bf1 Improve deployment organization and bashrc structure
Script Organization:
- Deploy scripts to ~/scripts/ instead of ~/ directly
- Create proper symlinks ~/bin/script -> ~/scripts/script
- Libraries go to ~/scripts/lib_scriptname/ for better organization

Bashrc Improvements:
- Add modular .bashrc with .bash_env, .bash_aliases, .bash_paths
- Include HISTTIMEFORMAT and enhanced history settings
- Smart PATH detection - only adds ~/bin if not already present
- Proper bash completion and dircolors setup
- Maintains all original functionality from complex version

Deployment now creates clean, organized structure on target servers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 16:25:37 +02:00
h0tznpl0tzandClaude 034018de87 Fix syntax error in select statement
Remove invalid stderr redirection from select statement.
Select cannot be redirected with >&2 syntax.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 16:21:53 +02:00
h0tznpl0tzandClaude 012d3158a0 Fix SSH target parsing bug in deploy.sh
- Redirect select UI output to stderr to prevent multiline capture
- Only SSH target goes to stdout for clean variable assignment
- Fixes 'invalid user name' error from corrupted ssh_target variable
- SSH connection now works properly like manual ssh command

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 16:19:28 +02:00
h0tznpl0tzandClaude 63121c71f8 Simplify deploy.sh following KISS principle
- Reduce from 419 to 230 lines (45% reduction)
- Replace complex find-based script detection with simple for loop
- Use bash select builtin instead of manual state management
- Consolidate server selection into single function
- Simplify bashrc deployment with direct PATH setup
- Remove unnecessary abstractions while preserving all features

Features preserved:
- Auto-detection of scripts via ~/bin symlinks
- Interactive script and server selection
- Support for web N, mx N, logger, support servers
- Bashrc deployment with PATH configuration
- Lib dependencies handling
- Dry-run functionality
- Symlink creation in ~/bin

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:48:14 +02:00
h0tznpl0tzandClaude 248b2f9c1a Simplify exitrace.sh following KISS principle
- Eliminate 345 lines of duplicated HERE-document code
- Replace complex remote execution with local deployment approach
- Remove AWK array context errors from shell escaping
- Preserve all features: -FROM/-TO/-DOMAIN/-MSGID/-GREP, time filters, MX records, status classification
- Maintain backwards compatibility with -f/-t/-D/-m/-G parameters
- Use deploy.sh for installation on logger.in.nessus.at

Reduces complexity while maintaining full functionality.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:46:04 +02:00
h0tznpl0tzandClaude fb66a3a014 Add interactive deployment system for easyname server infrastructure
- Auto-detects scripts via symlinks in ~/bin
- Interactive script and server selection
- Supports bashrc deployment
- Handles lib/ dependencies
- Includes security improvements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:14:57 +02:00
h0tznpl0tzandClaude 9241cc3d14 Improve exitrace parameter naming for better usability
- Add descriptive parameter names: -FROM, -TO, -DOMAIN, -MSGID, -GREP
- Maintain backwards compatibility with old short forms (-f, -t, -D, -m, -G)
- Update README with new examples and backwards compatibility section
- More intuitive and self-documenting command line interface

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:06:40 +02:00
h0tznpl0tzandClaude 0774ed0729 Fix AWK array initialization error
- Initialize rcpts array properly to avoid scalar/array error
- Skip empty recipient strings in output formatting
- Ensures proper 2D array handling in AWK

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:02:08 +02:00
h0tznpl0tzandClaude aa6a470b0d Fix AWK regex syntax error in exitrace
- Fix unterminated regexp in deferred detection
- Simplify regex pattern for 'all hosts failing' detection
- Removes problematic single quote escaping in AWK

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 15:00:48 +02:00
h0tznpl0tzandClaude 7d5d4cb7b1 Refactor exitrace to remote execution model
- Complete rewrite following checkms pattern
- Remote execution on logger.in.nessus.at via SSH/go-tool
- Inline all functions for remote heredoc execution
- Remove lib/ directory - no longer needed
- Maintains full API compatibility
- Automatic fallback: go tool -> LUSER ssh -> error

Fixes issue where exitrace could not access logs on logger.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 14:59:00 +02:00
h0tznpl0tzandClaude 124337e0a4 Fix symlink resolution in exitrace
- Make SCRIPT_DIR robust for symlink execution
- Resolves lib/ dependency loading when called via ~/bin symlink
- Maintains compatibility with direct execution

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 14:29:52 +02:00
h0tznpl0tzandClaude 72537749c5 Fix file permissions for legacy scripts
- Make checkms.sh and go.sh executable
- Required for proper script execution

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 14:16:57 +02:00
h0tznpl0tzandClaude d1e28599c9 Refactor exitrace to modular architecture
- Split monolithic exitrace.sh into focused lib/ modules
- date_utils.sh: Date validation and generation functions
- mx_lookup.sh: MX record lookup functionality
- log_analyzer.awk: Core log analysis logic extracted from main script
- Maintains full backward compatibility with existing interface
- Improves maintainability, testability, and code organization

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 14:04:12 +02:00