Skip to content

Instantly share code, notes, and snippets.

--- a/etc/init.d/ubnt-rcS
+++ b/etc/init.d/ubnt-rcS
@@ -29,8 +29,11 @@
if [ ! -e "$LAST_TIME_FILE" ]; then
echo '2015-01-01 00:00' >$LAST_TIME_FILE
+ touch -d '2015-01-01 00:00' $LAST_TIME_FILE
fi
- /bin/date -s "$(cat $LAST_TIME_FILE)" >/dev/null 2>&1
+ local last_time="$(date -r $LAST_TIME_FILE +%s)"