Hi
tried searching before starting this thread and also tried asking chatgpt without success
using latest Merlinwrt on GT-AX6000
I have a script which I need to run after every start/restart of wireless and after reboot (but not other events)
this is the template I tried but it didn't work
any help would be appreciated
tried searching before starting this thread and also tried asking chatgpt without success
using latest Merlinwrt on GT-AX6000
I have a script which I need to run after every start/restart of wireless and after reboot (but not other events)
this is the template I tried but it didn't work
Code:
#!/bin/sh
# Check if the event is start, restart, or reboot
if [ "$1" = "start" ] || [ "$1" = "restart" ]; then
if [ "$2" = "wireless" ]; then
logger "Wireless is starting or restarting. Executing custom script..."
# Place your custom commands here
# Example: restart a service, configure settings, etc.
# /path/to/your/custom/script.sh
fi
elif [ "$1" = "reboot" ]; then
logger "System is rebooting. Executing custom reboot script..."
# Place your custom reboot-related commands here
# /path/to/your/custom/reboot_script.sh
fi
any help would be appreciated
Last edited: