Fixed: Remove crontab entries created by previous versions of timeshift

This commit is contained in:
Tony George 2014-08-18 21:23:46 +05:30
parent 50b62c7335
commit 2b32476b5d
2 changed files with 23 additions and 14 deletions

View File

@ -2173,7 +2173,16 @@ public class Main : GLib.Object{
new_entry = get_crontab_entry_scheduled();
new_entry_exists = false;
//check for every entry
//check and remove crontab entries created by previous versions of timeshift
search_string = "*/30 * * * * timeshift --backup";
current_entry = crontab_read_entry(search_string);
if (current_entry.length > 0) {
//remove entry
crontab_remove_job(current_entry);
}
//check for regular entries
foreach(string interval in new string[] {"@monthly","@weekly","@daily","@hourly"}){
search_string = "%s timeshift --backup".printf(interval);

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: timeshift 1.2\n"
"Report-Msgid-Bugs-To: teejee2008@gmail.com\n"
"POT-Creation-Date: 2014-08-18 21:15+0530\n"
"POT-Creation-Date: 2014-08-18 21:21+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -123,7 +123,7 @@ msgstr ""
msgid "Backup device does not have enough space"
msgstr ""
#: Main.vala:2325 MainWindow.vala:1312 MainWindow.vala:1320
#: Main.vala:2334 MainWindow.vala:1312 MainWindow.vala:1320
msgid "Backup device does not have enough space!"
msgstr ""
@ -135,7 +135,7 @@ msgstr ""
msgid "Backup device is not mounted!"
msgstr ""
#: Main.vala:2317
#: Main.vala:2326
msgid "Backup device not available"
msgstr ""
@ -217,11 +217,11 @@ msgstr ""
msgid "Critical Error"
msgstr ""
#: Main.vala:2263
#: Main.vala:2272
msgid "Cron job added"
msgstr ""
#: Main.vala:2276
#: Main.vala:2285
msgid "Cron job removed"
msgstr ""
@ -409,7 +409,7 @@ msgstr ""
msgid "Excluded Directories"
msgstr ""
#: Main.vala:2267
#: Main.vala:2276
msgid "Failed to add cron job"
msgstr ""
@ -429,7 +429,7 @@ msgstr ""
msgid "Failed to delete symlinks"
msgstr ""
#: Main.vala:2416
#: Main.vala:2425
msgid "Failed to estimate system size"
msgstr ""
@ -457,7 +457,7 @@ msgstr ""
msgid "Failed to mount device"
msgstr ""
#: Main.vala:2280
#: Main.vala:2289
msgid "Failed to remove cron job"
msgstr ""
@ -502,7 +502,7 @@ msgstr ""
msgid "First Snapshot"
msgstr ""
#: Main.vala:2331 MainWindow.vala:1321
#: Main.vala:2340 MainWindow.vala:1321
msgid "First snapshot needs"
msgstr ""
@ -746,7 +746,7 @@ msgstr ""
msgid "Nothing to do!"
msgstr ""
#: Main.vala:2473
#: Main.vala:2482
msgid "Older log files removed"
msgstr ""
@ -805,7 +805,7 @@ msgstr ""
msgid "Please select a snapshot to view the log!"
msgstr ""
#: Main.vala:2314 MainWindow.vala:1301
#: Main.vala:2323 MainWindow.vala:1301
msgid "Please select the backup device"
msgstr ""
@ -1131,7 +1131,7 @@ msgstr ""
msgid "Target"
msgstr ""
#: Main.vala:2516
#: Main.vala:2525
msgid "Terminating rsync process"
msgstr ""
@ -1276,7 +1276,7 @@ msgstr ""
msgid "days..."
msgstr ""
#: Main.vala:2307
#: Main.vala:2316
msgid "free"
msgstr ""