FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
480 views 5 comments
by anonymous
Hi,

i'm confused.
I try my first steps with UCI command @RUT24x.

1.) problem:
command -ash luci-reload not found

2.) UCI command changes not active or not displayed in WebUI. I have tried to change following configuration.
uci set system.system.timezone='CET-1CEST,M3.5.0,M10.5.0/3'
uci set system.system.zoneName='Europe/Zurich'
uci set system.system.routername='Test'
uci commit system
reload_config

I can't see the changes in the WebUI -> Routername and Time settings.
If I check it with -> "uci show system" I can see all new settings.

BR, Tifoso

1 Answer

0 votes
by anonymous

Hello,

1) Regarding the 'command -ash luci-reload not found' issue, It seems like the guide found in our wiki has not yet been updated. I would like to apologize for that. After the 7.0 firmware release, the 'luci' command has been changed into 'vuci'. In addition, the equivalent of 'luci-reload' is now 'reload_config'.

2) For the second one, there are two configurations for setting the timezone via uci: system and ntpclient. By default the update interval for NTP client is set to 86400 seconds, therefore you need to configure it in a shorter interval.

Try the following uci commands:
uci set ntpclient.@ntpclient[0].interval='10'
uci set ntpclient.@ntpclient[0].zoneName='Europe/Zurich'
uci set system.system.zoneName='Europe/Zurich'
uci set system.system.timezone='CET-1CEST,M3.5.0,M10.5.0/3'
uci commit 
reload_config
/etc/init.d/ntpclient restart
/etc/init.d/system restart
/etc/init.d/sysntpd restart
/etc/init.d/sysfixtime restart

These commands should do it. Kindly let me know the results. smiley


Best regards,

Robert

by anonymous
Dear Robert,

great - you made my dax/weekend. ;-)

Other question:
I would like to erase/delete all auto reboot settings and set new ones with uci.
- Where I can find this settings?
- Is there a command to delete all auto reboot settings in one?

Have a nice weekend
BR, Tifoso
by anonymous

Hello Tifoso,

Good to hear that I can help you. 

For your other question: 
We have different types of Auto Reboot: Ping/Wget and Reboot Scheduler. You can find more information about it here.
Once you are connected to your router's CLI, you can find different parameters to set values on via UCI commands using the ls /etc/config. For example in your case, in the /etc/config directory, there's a section called ping_reboot. You can then use the uci show ping_reboot to see what parameters you can configure. Use the uci delete command for the parameter that you needed to delete.

I wouldn't recommend deleting all the autoreboot settings. Instead, configure the parameters one by one such as enabling/disabling periodic_reboot instance etc.

Note: It's always a good practice to back up your system configuration files before making any changes.

Best regards,

by anonymous

I'm back with playing uci commands. I would like to add a new ping_reboot task.
I don't know the number [x]. If add a new task it will be incremented and different to any router. UCI set should you the last added number e.g. [3] or [5] or [10] or something else

uci show ping_reboot
uci add ping_reboot ping_reboot
uci set ping_reboot.@ping_reboot[10].enable='1'
uci set ping_reboot.@ping_reboot[10].stop_action='0'
uci set ping_reboot.@ping_reboot[10].type='ping'
uci set ping_reboot.@ping_reboot[10].action='1'
uci set ping_reboot.@ping_reboot[10].time='15'
uci set ping_reboot.@ping_reboot[10].time_out='10'
uci set ping_reboot.@ping_reboot[10].packet_size='56'
uci set ping_reboot.@ping_reboot[10].retry='3'
uci set ping_reboot.@ping_reboot[10].interface='1'
uci set ping_reboot.@ping_reboot[10].ip_type='ipv4'
uci set ping_reboot.@ping_reboot[10].host='8.8.8.8'
uci commit
reload_config
/etc/init.d/ping_reboot restart
/etc/init.d/system restart

by anonymous

the magic formula is. :-)
 

uci add ping_reboot ping_reboot
uci set ping_reboot.@ping_reboot[-1].enable='1'
uci set ping_reboot.@ping_reboot[-1].stop_action='0'
uci set ping_reboot.@ping_reboot[-1].type='ping'
uci set ping_reboot.@ping_reboot[-1].action='1'
uci set ping_reboot.@ping_reboot[-1].time='15'
uci set ping_reboot.@ping_reboot[-1].time_out='10'
uci set ping_reboot.@ping_reboot[-1].packet_size='56'
uci set ping_reboot.@ping_reboot[-1].retry='3'
uci set ping_reboot.@ping_reboot[-1].interface='1'
uci set ping_reboot.@ping_reboot[-1].ip_type='ipv4'
uci set ping_reboot.@ping_reboot[-1].host='8.8.8.8'
uci commit
reload_config
/etc/init.d/ping_reboot restart
/etc/init.d/system restart

by anonymous

Hello,

The [10] in the 'uci' command refers to the index of the configuration entry in the router 'ping_reboot' section. It means that you are setting the values for the configuration entry with the index of 10 in the 'ping_reboot' section.

It's important to note that the index '[10]' is arbitrary and you can use any valid index number for your configuration entries. If you don't specify an index, 'uci' will automatically assign one for you.

When adding a new 'ping_reboot' instance, you should use an index number that is not currently being used by any other instance.

In your case, when you used the '[-1]' index with the 'uci' command, the uci tool will automatically assign a new valid index number for the configuration entry being added.

Best regards,

Robert