Hello,
I want to run a shell script after booting openwrt by putting the script into the files folder so that when i build openwrt my scripts are automatically included in the build.
I read that there is a folder called "files" in the root source openwrt build directory (~sourcce/files), anything placed in that folder will get included when you build openwrt.
For example if you put a file in ~/source/files/etc it will appear in the /etc folder when you flash the binary to the onion device.
So I tried that and it worked. The files do appear in there. So I read on this website:
https://stackoverflow.com/questions/33340659/how-to-auto-start-an-application-in-openwrt
That to get a script to run after boot up, I just need to put my script into /etc/init.d folder, then enable that script.
But it seems if i try to type
/etc/init.d/<your script> enable
that enable function doesnt work in the onion openwrt docker for some reason.
It gives an error that it cant open /etc/rc.common
my script has execute permissions and has this in it:
#!/bin/sh /etc/rc.common
echo "hello"
Does anyone know how to get a script to automatically run after booting openwrt, and have that script be apart of the build so that it automatically runs after boot after i flash it without having to type any other commands after flashing?
Thanks