Version: 1.0
A macOS utility script for automated FortiGate network route management and repair.
- macOS system
- Root privileges
- FortiGate network environment
- Download or clone this repository
- Place both
fortiRepair.shandroutes.listin your preferred directory (recommended:/opt/fortiRepair/) - Ensure the script has executable permissions:
sudo chmod +x /opt/fortiRepair/fortiRepair.sh
Run the script manually with root privileges:
sudo /opt/fortiRepair/fortiRepair.shTo run fortiRepair automatically using macOS Launch Daemons:
Place the local.fortiRepair.plist file in the Launch Daemons directory:
sudo cp local.fortiRepair.plist /Library/LaunchDaemons/Edit /Library/LaunchDaemons/local.fortiRepair.plist to match your setup:
- ProgramArguments: Update the script path if you placed it somewhere other than
/opt/fortiRepair/ - StartInterval: Set the execution interval in seconds (e.g., 300 for 5 minutes)
Load and enable the daemon:
sudo launchctl load -w /Library/LaunchDaemons/local.fortiRepair.plistTo permanently remove the automatic execution:
sudo launchctl unload -w /Library/LaunchDaemons/local.fortiRepair.plist
sudo rm /Library/LaunchDaemons/local.fortiRepair.plistfortiRepair.sh- Main repair scriptroutes.list- Route configuration filelocal.fortiRepair.plist- Launch Daemon configuration
- This script must be run with root privileges
- Ensure both
fortiRepair.shandroutes.listare in the same directory - Test the script manually before setting up automatic execution
- Monitor system logs for any execution errors when running automatically
- Verify file permissions if the script fails to execute
- Check
/var/log/system.logfor Launch Daemon related messages - Ensure the paths in
local.fortiRepair.plistmatch your actual file locations
[Add your license information here]
[Add contribution guidelines here]