From 8eaac4b637d989680ad86dc3e84b0f3b547c1619 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 27 Jan 2016 16:47:23 +0100 Subject: Use numeric prefixes for uci-defaults scripts Signed-off-by: Jo-Philipp Wich --- .../freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate | 6 ++++++ .../freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate delete mode 100644 contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate (limited to 'contrib/package/freifunk-mapupdate') diff --git a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate new file mode 100644 index 000000000..dee7f1bb5 --- /dev/null +++ b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate @@ -0,0 +1,6 @@ +#!/bin/sh +test -f /etc/crontabs/root || touch /etc/crontabs/root +SEED="$( dd if=/dev/urandom bs=2 count=1 2>&- | hexdump | if read line; then echo 0x${line#* }; fi )" +MIN="$(( $SEED % 59 ))" +grep -q "ff_mapupdate.sh" /etc/crontabs/root || echo "$MIN * * * * /usr/sbin/ff_mapupdate.sh" >> /etc/crontabs/root +/etc/init.d/cron restart diff --git a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate deleted file mode 100644 index dee7f1bb5..000000000 --- a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/freifunk-mapupdate +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -test -f /etc/crontabs/root || touch /etc/crontabs/root -SEED="$( dd if=/dev/urandom bs=2 count=1 2>&- | hexdump | if read line; then echo 0x${line#* }; fi )" -MIN="$(( $SEED % 59 ))" -grep -q "ff_mapupdate.sh" /etc/crontabs/root || echo "$MIN * * * * /usr/sbin/ff_mapupdate.sh" >> /etc/crontabs/root -/etc/init.d/cron restart -- cgit v1.2.3