sh11
1
I compiled a program then I installed it to my openwrt router. I want to make this program autorun when the router is powered on.
How can I do this feature ?
Please help me.
Let assume this is my program.
#include <stdio.h>
int main(void)
{
printf("\nHello, world!\n\n");
return 0;
}
If you do not have/want an init script you can add it to /etc/rc.local
. That runs the program at the end of the boot process
4 Likes
hnyman
4
The example couldn't be much worse...
If that is your program, you will likely see nothing, as there is no console for most processes (and you are printing to the console stdout)...