mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 06:40:13 -08:00
feat: Migrate to system-specific crontab files with enhanced logging and management
This commit is contained in:
61
README.md
61
README.md
@@ -334,3 +334,64 @@ Note that these commands will run as `root`.
|
||||
```shell
|
||||
./shell/plex.sh {start|stop|restart|status}
|
||||
```
|
||||
|
||||
## Enhanced Crontab System Migration
|
||||
|
||||
### System Status
|
||||
|
||||
The crontab system has been migrated from a universal `crontab.txt` to system-specific files:
|
||||
|
||||
- **crontab-europa.txt** - Media server configuration
|
||||
- **crontab-io.txt** - Download/acquisition server configuration
|
||||
- **crontab-racknerd.txt** - Backup server configuration
|
||||
|
||||
### Legacy File Status
|
||||
|
||||
The original `crontab.txt` has been:
|
||||
|
||||
- **Backed up** to `crontab.txt.bak`
|
||||
- **Role**: Previously served as fallback, now obsolete
|
||||
- **Content**: Contains mixed configuration that was split into system-specific files
|
||||
|
||||
### Current Management
|
||||
|
||||
Use the system-specific approach:
|
||||
|
||||
```bash
|
||||
# Install system-specific crontab
|
||||
./manage-enhanced-crontab.sh install
|
||||
|
||||
# The script automatically detects hostname and uses appropriate file
|
||||
# europa -> crontab-europa.txt
|
||||
# io -> crontab-io.txt
|
||||
# racknerd -> crontab-racknerd.txt
|
||||
```
|
||||
|
||||
### Fallback Behavior
|
||||
|
||||
If a system-specific file is missing, the management script will:
|
||||
|
||||
1. **Warning**: Display that system-specific file is not found
|
||||
2. **Recommendation**: Create appropriate system-specific file
|
||||
|
||||
### Creating New System Files
|
||||
|
||||
For new systems, create system-specific files based on the templates:
|
||||
|
||||
```bash
|
||||
# Copy and customize for new system
|
||||
cp crontab-europa.txt crontab-newsystem.txt
|
||||
# Edit for system-specific tasks
|
||||
```
|
||||
|
||||
### Benefits of System-Specific Approach
|
||||
|
||||
- **Clear separation** of concerns between systems
|
||||
- **Reduced conflicts** from universal configurations
|
||||
- **System-appropriate** task scheduling
|
||||
- **Better maintenance** and troubleshooting
|
||||
- **Scalable** for additional systems
|
||||
|
||||
#### Migration Notes
|
||||
|
||||
Migration completed: May 26, 2025
|
||||
|
||||
Reference in New Issue
Block a user