diff options
Diffstat (limited to 'app-laptop/prey/files/prey-0.5.4-cron-functions.patch')
-rw-r--r-- | app-laptop/prey/files/prey-0.5.4-cron-functions.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app-laptop/prey/files/prey-0.5.4-cron-functions.patch b/app-laptop/prey/files/prey-0.5.4-cron-functions.patch new file mode 100644 index 000000000000..963b685292c7 --- /dev/null +++ b/app-laptop/prey/files/prey-0.5.4-cron-functions.patch @@ -0,0 +1,28 @@ +Index: prey/core/functions +=================================================================== +--- prey.orig/core/functions ++++ prey/core/functions +@@ -194,12 +194,12 @@ get_delay_for(){ + + get_current_delay(){ + # crontab -l | grep prey | sed "s/^..\([0-9]*\).*/\1/" +- crontab -l 2> /dev/null | grep prey | head -1 | sed 's/ \/.*//' ++ sed -i 's/ \/.*//' /etc/cron.d/prey.cron + } + + update_execution_delay(){ + local full_path=$(full_path "$base_path") +- (crontab -l 2> /dev/null | grep -v prey; echo "${1}" "${full_path}/prey.sh > /var/log/prey.log 2>&1") | crontab - ++ echo "${new_delay}" "/usr/bin/prey.sh > /var/log/prey.log" > /etc/cron.d/prey.cron + } + + # if device is missing we'll make sure the current delay matches the one +@@ -273,7 +273,7 @@ verify_installation(){ + log " !! Cron daemon not found! Try running it with 'sudo /etc/init.d/cron start'." + fi + log " -- Checking for crontab entry..." +- local result=`crontab -l | grep 'prey.sh' | wc -l 2> /dev/null` ++ local result=`wc -l /etc/cron.d/prey.cron 2> /dev/null` + if [ "$result" -gt 0 ]; then + log " -- Found!" + else |