How to Create a script which starts at boot of your TL-MR3040 - techonsteroids

Breaking

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Sunday, May 28, 2017

How to Create a script which starts at boot of your TL-MR3040


















Write this as the first line of your script:
#!/bin/sh /etc/rc.common

Include into your script the command:

START=30
STOP=80

boot() {
              
           #your commands here


}



Copy your script into 
/etc/init.d/ directory 

Make it executable 
chmod +x /etc/init.d/<your script>

Create a symlink in /etc/rc.d/
ls -lh /etc/rc.d | grep <your script>

Enable your script

/etc/init.d/<your script> enable

Check that your init script is enabled
/etc/init.d/<your script> enabled && echo on

If this command returns on, then you're all set. 
If this command doesn't return anything, then your script isn't enabled. 
Here's an example of a script that's enabled:

root@OpenWrt:~# /etc/init.d/system enabled && echo on
on

No comments:

Post a Comment

Messaging Morse Code with TL-MR3040 Leds

#Install the  kmod-ledtrig-morse opkg install kmod-ledtrig-morse #list your leds ls -1 /sys/class/leds/ #enable mor...

Post Top Ad

Responsive Ads Here