diff options
author | Karel Kočí <karel.koci@nic.cz> | 2017-09-22 11:33:31 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2017-09-22 11:33:31 +0200 |
commit | 819941ea677c3c567ba82a0e1efd094e5cdade54 (patch) | |
tree | d22ab0c49dcfc3d8e30b00b83b1396085799ac49 /rmbt-client/files/updater.defaults | |
parent | 8bd8c85a7f65c0484fa23b9d62b9af8dce2c1491 (diff) | |
download | turris-myrepo-819941ea677c3c567ba82a0e1efd094e5cdade54.tar.gz turris-myrepo-819941ea677c3c567ba82a0e1efd094e5cdade54.tar.bz2 turris-myrepo-819941ea677c3c567ba82a0e1efd094e5cdade54.zip |
Drop rmbt-client
Diffstat (limited to 'rmbt-client/files/updater.defaults')
-rw-r--r-- | rmbt-client/files/updater.defaults | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/rmbt-client/files/updater.defaults b/rmbt-client/files/updater.defaults deleted file mode 100644 index 951558a..0000000 --- a/rmbt-client/files/updater.defaults +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# We want to generate some "random" time when the updater is run, every 12 hours. -# The time when the router is first booted or the updater is installed for -# the first time is as good source of the time as any. -# -# With date +%l we get time in interval 1-12. Substracting 1 gives us 0-11, and -# the next run is 12-23 by adding 12. We may take the minutes as they are. -# -# We need to take care not to have leading zeroes, since tools tend to take that -# as octal. We don't want to study which tools are OK with it, so we simply -# don't have them. - -HOUR=$(($(date +%I | sed -e 's/^0*\(..*\)/\1/') - 1)) # We want 12-hour interval. And no leading zeroes (except for a lone 0) -HOUR_NEXT=$(($HOUR + 12)) -MINUTE=$(date +%M | sed -e 's/^0*\(..*\)/\1/') - -# Generate the cron script -( - echo 'MAILTO=""' - echo "$MINUTE $HOUR,$HOUR_NEXT * * * root /usr/bin/updater.sh >/dev/null 2>&1 &" - echo "0 0 * * * root /usr/bin/updater-unstuck.sh >/dev/null 2>&1" -) >/etc/cron.d/updater -chmod 0600 /etc/cron.d/updater |