Explorar o código

Update v-restore-user (#3708)

add function to removing \r (carriage return) from cron.conf restoring backup from vestacp
Asep Maulana Nuriman %!s(int64=2) %!d(string=hai) anos
pai
achega
3532b86372
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      bin/v-restore-user

+ 1 - 0
bin/v-restore-user

@@ -812,6 +812,7 @@ if [ "$cron" != 'no' ] && [ -n "$CRON_SYSTEM" ]; then
 		check_result "$E_PARSING" "$error"
 	fi
 
+	sed -i 's/\r//g' $tmpdir/cron/cron.conf
 	jobs=$(wc -l $tmpdir/cron/cron.conf | cut -f 1 -d' ')
 	if [ "$jobs" -eq 1 ]; then
 		echo -e "$(date "+%F %T") $jobs cron job" | tee -a $tmpdir/restore.log