Running one script at startup

Hi all
I installed one usb over ip application called Virtualhere on 1043nd with mips architecture
it works great on openwrt but every time the router starts I should ssh to it and run "./vhusbdmips"
please help me to do something that it starts automatically on startup
link of application:
https://www.virtualhere.com/usb_server_software
Best Regards

1 Like

Put your startup commands in /etc/rc.local, or in Luci go to System/Startup. Scroll to the bottom and put your commands there.

1 Like

https://openwrt.org/docs/techref/process.boot
https://openwrt.org/docs/guide-user/base-system/notuci.config#etcrclocal

Thanks for your reply
I added this command "./vhusbdmips" but it does not work
please help

Use full path to the script.
Make sure script file is executable.

please give me more instruction
when I ssh with root to openwrt I enter this command "./vhusbdmips"
now please tell what should I put in /etc/rc.local
Best Regards

When you ssh in run pwd.
It should say /root.
If so, the command would be /root/vhusbdmips

'./my_script' means 'look in the current directory for my_script and run it'. This command won't look anywhere else for your script, just the current directory. Is the current directory the same when you ssh in as when OpenWRT reboots and runs your command? You don't know - so you must specify the full path to my_script, else it may not be found.