Skip to content

Commit 16b7f1c

Browse files
author
Kristan Kenney
committed
Minor fixes to v-*-cron-hestia-autoupdate
* Remove duplicate demo mode check * Prevent an issue where cron job counter would fall out of sync after updates enabled/disabled.
1 parent 8c3d792 commit 16b7f1c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

bin/v-add-cron-hestia-autoupdate

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ time_n_date=$(date +'%T %F')
4444
time=$(echo "$time_n_date" |cut -f 1 -d \ )
4545
date=$(echo "$time_n_date" |cut -f 2 -d \ )
4646

47-
# Remove existing cron job
48-
$BIN/v-delete-cron-hestia-autoupdate
49-
5047
# Define time somewhere at night
5148
if [ -z "$mode" ] || [ "$mode" = "apt" ]; then
5249
min=$(generate_password '012345' '2')
@@ -82,9 +79,6 @@ sort_cron_jobs
8279
# Sync cronjobs with system crond
8380
sync_cron_jobs
8481

85-
# Perform verification if read-only mode is enabled
86-
check_hestia_demo_mode
87-
8882
#----------------------------------------------------------#
8983
# Hestia #
9084
#----------------------------------------------------------#
@@ -97,7 +91,7 @@ $BIN/v-restart-cron
9791
check_result $? "Cron restart failed" >/dev/null
9892

9993
# Logging
100-
log_history "added cron job $job"
94+
log_history "enabled automatic updates"
10195
log_event "$OK" "$ARGUMENTS"
10296

10397
exit

bin/v-delete-cron-hestia-autoupdate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ $BIN/v-restart-cron
6363
check_result $? "Cron restart failed" >/dev/null
6464

6565
# Logging
66+
log_history "disabled automatic updates"
6667
log_event "$OK" "$ARGUMENTS"
6768

6869
exit

0 commit comments

Comments
 (0)