sta-c0000 / tpconf_bin_xml

Command line utility to convert TP-Link router backup config files
164 stars 42 forks source link

[INFO] execute custom script #12

Closed Lokotito closed 3 years ago

Lokotito commented 4 years ago

I test this great tool with a w9980 and I have success enabling telnet: <Description val="Wireless Router`telnetd -p 1023 -l login`" />

But I can't run my script from script folder (/var/usbdisk/sda1/myscript/run.sh) <Description val="Wireless Router`(sleep 10;/var/usbdisk/sda1/myscript/run.sh)&gt;/dev/null &amp;`" />

This is my script:

!/bin/bash

sleep 15 killall -1 upnpd killall dyndns noipdns cwmp ushare

But after save MOD config (bin) to w9980 and reboot the device, services upnpd, dyndns, noipdns, cwmp still runing at start.

Also try deleting #!/bin/bash line from run.sh file but same result (upnpd, dyndns, noipdns, cwmp still runing after reboot) Any tip how can I run a script in the right way?

Thanks.

Lokotito commented 4 years ago

Sorry was my bad, (1) the script must be edited/created in linux system or windows using notepad++ and use Unix (LF) format for the file. (2) the script don't need to have #!/bin/bash at the beging.

After this fixes I can run the custom script.