Skip to content

Commit 3532b86

Browse files
authored
Update v-restore-user (hestiacp#3708)
add function to removing \r (carriage return) from cron.conf restoring backup from vestacp
1 parent 118158a commit 3532b86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin/v-restore-user

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ if [ "$cron" != 'no' ] && [ -n "$CRON_SYSTEM" ]; then
812812
check_result "$E_PARSING" "$error"
813813
fi
814814

815+
sed -i 's/\r//g' $tmpdir/cron/cron.conf
815816
jobs=$(wc -l $tmpdir/cron/cron.conf | cut -f 1 -d' ')
816817
if [ "$jobs" -eq 1 ]; then
817818
echo -e "$(date "+%F %T") $jobs cron job" | tee -a $tmpdir/restore.log

0 commit comments

Comments
 (0)