Changes

295 bytes added ,  14:19, 24 August 2018
Line 168: Line 168:     
Let's overview what each segment indicates sequentially:
 
Let's overview what each segment indicates sequentially:
* 0/0 - the actions for both rules must take place at minute 0 (right after the hour has changed)
+
* '''First line'''
* 8/18 - the actions must take place at 8 AM and 6 PM respectively
+
** 0 - the action must take place at minute 0 (right after the hour has changed)
* */* - all days of the month are applicable to the rules
+
** 8/18 - the action must take place at 8 AM
* */* - all months of the year are applicable to the rules
+
** * - all days of the month are applicable to the rule
* 1-5 - the actions for both rules must take place every Monday - Friday
+
** * - all months of the year are applicable to the rule
* set wireless.@wifi-iface[0].user_enable='''1/0''' - enables/disables the WiFi AP(note that the first rule has ''enable=1'' in it and the second one has ''enable=0''; 1 equals ON; 0 equals OFF)
+
** 1-5 - the action must take place every Monday - Friday
* uci delete wireless.@wifi-iface[0].disabled - deletes the WiFi ''disabled'' option
+
** uci set wireless.@wifi-iface[0].user_enable=1 - enables the WiFi AP
* uci set wireless.@wifi-iface[0].disabled=1 - disables the WiFi AP
+
** uci delete wireless.@wifi-iface[0].disabled - deletes the WiFi ''disabled'' option
* uci commit - commits configuration changes
+
** uci commit - commits configuration changes
* wifi - restarts the WiFi service
+
** wifi - restarts the WiFi service
* && - symbols used to separate different commands
+
* '''Second line'''
 +
** 0 - the action must take place at minute 0 (right after the hour has changed)
 +
** 18 - the action must take place at 6 PM
 +
** * - all days of the month are applicable to the rule
 +
** * - all months of the year are applicable to the rule
 +
** 1-5 - the action must take place every Monday - Friday
 +
** uci set wireless.@wifi-iface[0].user_enable=0 - disables the WiFi AP
 +
** uci set wireless.@wifi-iface[0].disabled=1 - disables the WiFi AP
 +
** uci commit - commits configuration changes
 +
** wifi - restarts the WiFi service
 +
* && - separates different commands
    
To sum up, the first line enables the WiFi AP at 8 AM, the second disables it at 6 PM. At the end of the enabling and disabling processes the changes are committed and the related services restarted. We used UCI to change the state of the WiFi AP. You can find more information on UCI in this article: '''[[UCI command usage]]'''.
 
To sum up, the first line enables the WiFi AP at 8 AM, the second disables it at 6 PM. At the end of the enabling and disabling processes the changes are committed and the related services restarted. We used UCI to change the state of the WiFi AP. You can find more information on UCI in this article: '''[[UCI command usage]]'''.

Navigation menu