From 572ecbe1010cd9b7938b1a886c14da56474b5cfb Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Mon, 3 Oct 2022 01:11:02 +0800 Subject: [PATCH] update: create crontab folder --- include/constant.h | 2 +- src/applet/crontab.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/constant.h b/include/constant.h index 83ad248..6bf1302 100644 --- a/include/constant.h +++ b/include/constant.h @@ -13,7 +13,7 @@ #define RESTART_DELAY 1 #define DIVERTER_TIMEOUT 6 -#define VERSION "1.3.0" +#define VERSION "1.3.1" #define CONFIG_FILE "cleardns.yml" #define ADGUARD_USER "admin" diff --git a/src/applet/crontab.c b/src/applet/crontab.c index 2dbf799..515f1c5 100644 --- a/src/applet/crontab.c +++ b/src/applet/crontab.c @@ -28,6 +28,8 @@ void crontab_dump(crontab *info) { // show crontab options in debug log process* crontab_load(crontab *info) { // load crontab options crontab_dump(info); + create_folder("/var/spool/cron/"); + create_folder("/var/spool/cron/crontabs/"); char *my_pid = uint32_to_string(getpid()); char *cron_cmd = string_join("\tkill -14 ", my_pid); // SIGALRM -> 14 char *cron_exp = string_join(info->cron, cron_cmd);