Skip to content

Commit a6eb339

Browse files
committed
Fix issue with v-rebuild-cron-jobs
1 parent 9b836a0 commit a6eb339

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.4.5] - Service release
5+
6+
### Bugfixes
7+
8+
- Revert #1943 Fix possible error occur for v-rebuild-cron-jobs
9+
410
## [1.4.4] - Service release
511

612
### Features

func/main.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,16 @@ sync_cron_jobs() {
610610
else
611611
crontab="/var/spool/cron/$user"
612612
fi
613-
>$crontab
613+
614+
# remove file
615+
rm -f $crontab
616+
touch $crontab
617+
614618
if [ "$CRON_REPORTS" = 'yes' ]; then
615619
echo "MAILTO=$CONTACT" > $crontab
616620
echo 'CONTENT_TYPE="text/plain; charset=utf-8"' >> $crontab
617621
fi
622+
618623
while read line; do
619624
parse_object_kv_list "$line"
620625
if [ "$SUSPENDED" = 'no' ]; then

0 commit comments

Comments
 (0)