6 Commits

Author SHA1 Message Date
0cc88a0eb9 ## Fix Duplicate Package Notifications
### Key Fix:
- **Eliminate Duplicates**: Each package now appears once regardless of host configurations
- **Base Name Tracking**: Use `processed_packages` set to track unique packages by base name
- **Clean Logic**: Check `app_base_name not in processed_packages` instead of full package name

### Problem Solved:
Before: Same package appeared multiple times for different host configurations
```
comi-parsec : 150.99.0.0-1 from : 150.93.2.0-2
comi-parsec : 150.99.0.0-1 from : 150.93.2.0-2
comi-parsec : 150.99.0.0-1 from : 150.93.2.0-2
```

After: Each package appears once with correct version information
```
comi-parsec : 150.99.0.0-1 from : 150.93.2.0-2
comi-stormshield-vpn : 5.1.2-8 from : 5.1.1-7
```

### Technical Changes:
- Added `processed_packages = set()` for duplicate tracking
- Extract `app_base_name` once for cleaner code
- Mark packages as processed with `processed_packages.add(app_base_name)`

### Version Bump:
Updated to version 2-2 for this bug fix
2025-12-30 16:19:49 +01:00
388320bbaf ## Consolidate Configuration Files
### Key Changes:
- **Unified Configuration**: Consolidated all configs into single package-named file
- **Removed Separate Files**: Deleted wapt_api.ini, smtp.ini, rocket.ini
- **Updated Functions**: Modified all functions to read from unified config
- **Version Bump**: Updated to version 2-1

### New Configuration Structure:
```
comi-apps-to-update-on-wapt-server.ini
├── [wapt]           # WAPT server credentials
├── [notifications]   # Notification preferences
├── [smtp]           # Email configuration
└── [rocket]         # Rocket.Chat configuration
```

### Benefits:
- **Simpler Deployment**: Single config file instead of 4 separate files
- **Better Organization**: Related settings grouped together
- **Easier Management**: One file to backup and configure
- **Cleaner Package**: No scattered configuration files

### Technical Updates:
- Updated install() function to copy unified config only
- Modified all config reading functions to use unified file path
- Enhanced debug output with step-by-step progress tracking
2025-12-30 16:08:26 +01:00
1f4338a85d ## Major Refactoring and Error Handling Improvements
### Key Changes:
- **Code Structure**: Complete refactoring removing 392→180 lines of duplicated code
- **Error Handling**: Added comprehensive error handling with detailed tracebacks
- **Configuration**: Added configurable notification methods (email/rocket/both)
- **Security**: Fixed function naming inconsistency (send_mail→send_email)
- **Validation**: Added input validation and graceful error fallbacks

### Bug Fixes:
- Fixed version conflict in WAPT/control (removed duplicate version entry)
- Fixed syntax error in French string (unescaped apostrophe)
- Fixed missing function calls and import issues

### New Features:
- Configurable notification channels via wapt_api.ini [notifications] section
- Default configuration fallbacks when config files missing
- Network timeout handling (30s for external requests)
- SSL certificate validation with proper error messages

### Technical Improvements:
- Modular function design for better testability
- Proper exception handling for all network operations
- Better error messages with tracebacks for debugging
- Cleaner separation of concerns
2025-12-30 15:48:34 +01:00
c95e799036 Actualiser WAPT/control 2024-07-05 12:53:20 +00:00
12991d42e1 clean control 2024-07-05 12:21:41 +02:00
44bc85b730 reorganisation 2024-07-05 11:14:18 +02:00