Skip to content

thekugelblitz/CSFreinstaller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CSFreinstaller v2

Reinstall CSF with backups and selective restoration options without hassle!


A powerful and safe shell script for fully reinstalling ConfigServer Security & Firewall (CSF) on cPanel/WHM servers. It includes automatic backups, interactive restoration options, and clean, controlled operations.


πŸ”§ Features

  • βœ… Automatically detects if CSF is installed
  • πŸ’Ύ It creates full backups of all important CSF configurations
  • 🧼 Clean uninstallation of existing CSF installation
  • πŸ“₯ Installs the latest CSF from ConfigServer
  • πŸ“‚ Interactive backup restore options
  • πŸ” Safe and failsafe logic with log output and no re-tries

πŸš€ Quick Install

Run this in your terminal (as root):

wget https://raw.githubusercontent.com/thekugelblitz/CSFreinstaller/main/CSFreinstaller_v2.sh -O CSFreinstaller.sh && chmod +x CSFreinstaller.sh && ./CSFreinstaller.sh

🧠 How It Works

  1. Check if CSF is installed
  2. If installed, backs up all config files into /root/csfbackup-YYYY-MM-DD-HHMMSS
  3. Uninstalls CSF completely and cleanly
  4. Installs the latest version from ConfigServer
  5. Lists available backup folders in /root/
  6. Offers interactive restore options:
    • Restore all components
    • Restore selected components
    • Skip restore
  7. Restarts CSF and LFD
  8. Logs everything to /root/CSFreinstaller.log

πŸ“‚ Backup Components Supported

  • csf.conf
  • csf.allow, csf.deny, csf.ignore, csf.pignore, csf.rignore
  • csf.logfiles, csf.smtpauth, csf.syslogs, csf.suignore
  • UI-related files: ui.allow, messenger templates, etc.

πŸ“„ Logs

  • Script Log: /root/CSFreinstaller.log
  • CSF Install Output: /root/CSF-install.log

πŸ›‘οΈ License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.


πŸ‘€ Author & Credits

Maintained & Developed by Dhruval Joshi from HostingSpell
GitHub Profile: @thekugelblitz | This was created by Dhruval Joshi to use at HostingSpell and optimised with the help of GPT4 later.


If you want to contribute, feel free to fork and submit a PR! πŸš€

Pull requests and contributions are welcome!


Releases

No releases published

Packages

No packages published

Languages