sushichao hace 5 horas
padre
commit
4cb6d2bc7f
Se han modificado 2 ficheros con 7 adiciones y 1 borrados
  1. 3 0
      etc/rc.local
  2. 4 1
      etc/scripts/shell_action.sh

+ 3 - 0
etc/rc.local

@@ -41,6 +41,9 @@ sleep 5
 
 bash /usr/bin/init.sh
 
+#cron reboot
+/etc/scripts/shell_action.sh set_cronreboot
+
 # udhcpc -i usb0 -n
 /etc/scripts/system_led.sh &
 

+ 4 - 1
etc/scripts/shell_action.sh

@@ -25,12 +25,14 @@ case ${action} in
         if [ -z "${CRON_STAT}" ];then
             /usr/sbin/crond -c ${CRON_DIR}
             sed -i '/check_log_size/d' ${CRON_CONF}
-            echo "0 2 * * * /etc/scripts/shell_action.sh check_log_size" > ${CRON_CONF}
+            echo "0 3 * * * /etc/scripts/shell_action.sh check_log_size" > ${CRON_CONF}
+            crontab -u root ${CRON_CONF}
         fi
 
         enable="`${SYSCONFCMD} ${SYSCONF} get restart-timer enable`"
         if [ "foo${enable}" == "foono" ];then
             sed -i '/reboot/d' ${CRON_CONF}
+            crontab -u root ${CRON_CONF}
             exit 0
         fi
 
@@ -41,6 +43,7 @@ case ${action} in
         minutes="`${SYSCONFCMD} ${SYSCONF} get restart-timer minutes`"
         sed -i '/reboot/d' ${CRON_CONF}
         echo "${minutes} ${hour} ${day} ${month} ${week} /sbin/reboot" >> ${CRON_CONF}
+        crontab -u root ${CRON_CONF}
         exit 0
     ;;