11get_next_cron_string () {
22 # Parsing config
3- curr_str=$( grep " JOB=" $V_USERS /$user /crontab .conf| cut -f 2 -d \' | \
3+ curr_str=$( grep " JOB=" $V_USERS /$user /cron .conf| cut -f 2 -d \' | \
44 sort -n| tail -n1)
55
66 # Print result
@@ -9,7 +9,7 @@ get_next_cron_string() {
99
1010is_cron_job_free () {
1111 # Checking record id
12- check_job=$( grep " JOB='$job '" $V_USERS /$user /crontab .conf)
12+ check_job=$( grep " JOB='$job '" $V_USERS /$user /cron .conf)
1313
1414 if [ ! -z " $check_job " ]; then
1515 echo " Error: job exist"
@@ -20,7 +20,7 @@ is_cron_job_free() {
2020
2121sort_cron_jobs () {
2222 # Defining conf
23- conf=" $V_USERS /$user /crontab .conf"
23+ conf=" $V_USERS /$user /cron .conf"
2424 cat $conf | sort -n -k 2 -t \' > $conf .tmp
2525 mv -f $conf .tmp $conf
2626}
@@ -38,7 +38,7 @@ sync_cron_jobs() {
3838 echo " MAILTO=$email " > $conf
3939 fi
4040
41- # Reading user crontab .conf
41+ # Reading user cron .conf
4242 while read line ; do
4343 # Defining new delimeter
4444 IFS=$' \n '
@@ -53,12 +53,12 @@ sync_cron_jobs() {
5353 echo " $MIN $HOUR $DAY $MONTH $WDAY $CMD " | \
5454 sed -e " s/%quote%/'/g" -e " s/%dots%/:/g" >> $conf
5555 fi
56- done < $V_USERS /$user /crontab .conf
56+ done < $V_USERS /$user /cron .conf
5757}
5858
5959
6060is_job_valid () {
61- result=$( grep " JOB='$job '" $V_USERS /$user /crontab .conf)
61+ result=$( grep " JOB='$job '" $V_USERS /$user /cron .conf)
6262
6363 if [ -z " $result " ]; then
6464 echo " Error: job not exists"
@@ -68,8 +68,8 @@ is_job_valid() {
6868}
6969
7070del_cron_job () {
71- str=$( grep -n " JOB='$job '" $V_USERS /$user /crontab .conf| cut -f 1 -d :)
72- sed -i " $str d" $V_USERS /$user /crontab .conf
71+ str=$( grep -n " JOB='$job '" $V_USERS /$user /cron .conf| cut -f 1 -d :)
72+ sed -i " $str d" $V_USERS /$user /cron .conf
7373}
7474
7575crn_json_list () {
@@ -163,7 +163,7 @@ crn_shell_list() {
163163
164164is_job_suspended () {
165165 # Parsing jobs
166- str=$( grep " JOB='$job '" $V_USERS /$user /crontab .conf| grep " SUSPEND='yes'" )
166+ str=$( grep " JOB='$job '" $V_USERS /$user /cron .conf| grep " SUSPEND='yes'" )
167167
168168 # Checkng key
169169 if [ ! -z " $str " ]; then
@@ -175,7 +175,7 @@ is_job_suspended() {
175175
176176is_job_unsuspended () {
177177 # Parsing jobs
178- str=$( grep " JOB='$job '" $V_USERS /$user /crontab .conf| grep " SUSPEND='no'" )
178+ str=$( grep " JOB='$job '" $V_USERS /$user /cron .conf| grep " SUSPEND='no'" )
179179
180180 # Checkng key
181181 if [ ! -z " $str " ]; then
@@ -190,7 +190,7 @@ update_cron_job_value() {
190190 value=" $2 "
191191
192192 # Defining conf
193- conf=" $V_USERS /$user /crontab .conf"
193+ conf=" $V_USERS /$user /cron .conf"
194194
195195 # Parsing conf
196196 job_str=$( grep -n " JOB='$job '" $conf )
0 commit comments