Releases: brokechubb/cliproxyapi-installer
Releases · brokechubb/cliproxyapi-installer
Fix 'Text file busy' Error During Upgrades
Fix for "Text file busy" Error During Upgrades
This release fixes a critical issue where CLIProxyAPI upgrades would fail with a "Text file busy" error when the application was running during the upgrade process.
🐛 Bug Fixes
- Fixed "Text file busy" error: The installer now properly detects and stops all running CLIProxyAPI processes before attempting to upgrade the binary
- Graceful process termination: Implements a two-step shutdown process (TERM signal followed by KILL if needed)
- Comprehensive process detection: Handles both systemd services and manually started processes
🔧 Improvements
- Added
is_cliproxyapi_running()function to detect running processes - Added
stop_cliproxyapi_processes()function for graceful shutdown - Updated upgrade logic to stop all processes before binary replacement
- Maintains full backward compatibility for fresh installations
📋 Details
- Problem: When upgrading CLIProxyAPI while it was running, the installer would fail with "cp: cannot create regular file '/home/chubb/cliproxyapi/cli-proxy-api': Text file busy"
- Solution: The installer now detects and stops all running CLIProxyAPI processes before copying the new binary
- Process:
- Stop systemd service if running
- Stop any manual CLIProxyAPI processes if running
- Proceed with the upgrade
- Restart service automatically if it was running
✅ Testing
- Successfully tested upgrading from 6.2.35 to 6.3.0 with running processes
- Verified graceful shutdown and automatic service restart
- Confirmed configuration preservation during upgrade
Installation/Upgrade:
curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/master/cliproxyapi-installer | bashFor existing installations, the upgrade will now handle running processes automatically.
Release v0.51
Fix raw GitHub URL in installation command
v0.5: Smart Service Management & Configuration Protection
CLIProxyAPI Installer v0.5
🎉 Major Release: Smart Service Management & Configuration Protection
This release introduces intelligent service management and ironclad configuration protection for completely safe and seamless upgrades.
✨ Key Features
🔄 Smart Service Management
- Automatic Detection: Detects if CLIProxyAPI service is running before upgrades
- Graceful Handling: Safely stops service before applying updates
- State Preservation: Maintains service's previous running state after upgrades
- Enhanced Logging: Clear feedback about service status throughout the upgrade process
🛡️ Configuration Protection
- Never Overwrite Policy: User-modified
config.yamlfiles are NEVER replaced during upgrades - Priority System: Clear hierarchy for configuration preservation:
- Backup from current upgrade
- Existing user config (protected)
- Previous version config
- Example config (only if nothing else exists)
- Automatic Backups: Configuration backups created before any upgrade operations
- User Notifications: Clear messaging when user configurations are preserved
⚙️ Improved Systemd Integration
- Fixed Service File: Resolved systemd service configuration issues
- Better Error Handling: Improved service startup and restart reliability
- Simplified Security: Removed problematic restrictions while maintaining security
🚀 Upgrade Experience
Before v0.5:
$ ./cliproxyapi-installer upgrade
# Service might crash during upgrade
# Config could be overwritten
# Manual service restart requiredAfter v0.5:
$ ./cliproxyapi-installer upgrade
[INFO] Service is currently running and will be restarted after upgrade
[INFO] Stopping CLIProxyAPI service...
[SUCCESS] Service stopped
[INFO] Setting up configuration...
[SUCCESS] Preserved existing user configuration (config.yaml)
[INFO] User modifications are protected during upgrades
...
[INFO] Restarting CLIProxyAPI service...
[SUCCESS] Service restarted successfully
[SUCCESS] CLIProxyAPI upgraded from X.Y.Z to A.B.C!
[INFO] Service has been restarted automatically
[INFO] Your existing configuration has been preserved📋 Upgrade Behavior Matrix
| Scenario | Service Action | Config Action |
|---|---|---|
| Service running | Stop → Upgrade → Restart | Preserved with backup |
| Service stopped | Upgrade only | Preserved with backup |
| First install | N/A | Created from example with generated keys |
🔧 Installation
Quick Install
curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/main/cliproxyapi-installer | bashManual Install
git clone https://github.com/brokechubb/cliproxyapi-installer.git
cd cliproxyapi-installer
./cliproxyapi-installer🐛 Bug Fixes
- Fixed systemd service GROUP permission errors
- Resolved service startup failures after upgrades
- Eliminated configuration file overwrites during upgrades
- Improved error handling and user feedback
📚 Documentation
- Completely updated README with new features
- Enhanced troubleshooting section
- Added comprehensive changelog
- Improved quick start guide with service management tips
🔒 Security
- User configurations are now protected from accidental overwrites
- Service management is more reliable and predictable
- Better error handling prevents service failures
- Configuration backups provide recovery options
⚠️ Breaking Changes
None - This release is fully backward compatible.
🙏 Acknowledgments
This release addresses critical user feedback about upgrade safety and service management. Thank you to everyone who reported issues and provided suggestions!
🔒 Your configuration is safe. Your service is managed. Your upgrades are seamless.