Startup script not running on 7.20.3

Hello,

I’m new to this platform (RUT956) so I expect there’s a simple answer to why the following script isn’t running at startup. In other posts I’ve seen reference to the echoed strings going into some system log. If that is correct, where is that system log? The script runs fine when I run it from the command line.

At startup the mkdir commands don’t even create the subdirectories. The /home/root/MTIEnt directory exists and the init script is in that directory.

Any thoughts appreciated.

Thanks, Dave

#!/bin/ash

echo “MTI startup script ***************************”

sleep 20

echo “MTI startup script AFTER SLEEP ***************************”

mkdir /var/usr/MTIEnt

mkdir /var/usr/MTIBase

cd /home/root/MTIEnt

./initMTI.sh &

echo “END MTI startup script ***************************”

exit 0

Greetings,

Is this script located in the /etc/rc.local file (or under System → Maintenance → Custom Scripts if you configured it through the WebUI)?

Instead of using echo , try using the logger command, for example:
logger "MTI startup script"

You can then check the output by running the logread command in the CLI: Command Line Interfaces - Teltonika Networks Wiki

Try specifying the absolute path to the script and add sh before it. Also ensure that the file has execute permissions by running:
chmod +x

Best Regards,
Justinas