Skip to content

Commit b6ada1d

Browse files
author
Kristan Kenney
committed
Ensure restart flag is used
1 parent ef7dbb6 commit b6ada1d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bin/v-add-cron-job

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ sync_cron_jobs
8484
increase_user_value $user '$U_CRON_JOBS'
8585

8686
# Restarting crond
87-
$BIN/v-restart-cron
87+
$BIN/v-restart-cron $restart
8888
check_result $? "Cron restart failed" >/dev/null
8989

9090
# Logging

bin/v-delete-cron-job

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# Argument definition
1616
user=$1
1717
job=$2
18+
restart=$3
1819

1920
# Includes
2021
# shellcheck source=/usr/local/hestia/func/main.sh
@@ -27,7 +28,7 @@ source $HESTIA/conf/hestia.conf
2728
# Verifications #
2829
#----------------------------------------------------------#
2930

30-
check_args '2' "$#" 'USER JOB'
31+
check_args '2' "$#" 'USER JOB [RESTART]'
3132
is_format_valid 'user' 'job'
3233
is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
3334
is_object_valid 'user' 'USER' "$user"
@@ -65,7 +66,7 @@ if [ ! -z "$suspended" ]; then
6566
fi
6667

6768
# Restarting crond
68-
$BIN/v-restart-cron
69+
$BIN/v-restart-cron $restart
6970
check_result $? "Restart restart failed" >/dev/null
7071

7172
# Logging

0 commit comments

Comments
 (0)