Project

General

Profile

« Previous | Next » 

Revision 457573e2

Added by Renato Botelho almost 6 years ago

Add support to run a command after final rsync

View differences:

tools/builder_common.sh
1448 1448
					echo ">>> ERROR: An error occurred sending repo to final hostname"
1449 1449
					print_error_pfS
1450 1450
				fi
1451

  
1452
				if [ -z "${PKG_POST_RSYNC_COMMAND}" ]; then
1453
					continue
1454
				fi
1455

  
1456
				echo -n ">>> Running post rsync command at ${_pkg_final_rsync_hostname}... " | tee -a ${_logfile}
1457
				if script -aq ${_logfile} ssh -p ${PKG_FINAL_RSYNC_SSH_PORT} \
1458
				    ${PKG_FINAL_RSYNC_USERNAME}@${_pkg_final_rsync_hostname} "${PKG_POST_RSYNC_COMMAND}"; then
1459
					echo "Done!" | tee -a ${_logfile}
1460
				else
1461
					echo "Failed!" | tee -a ${_logfile}
1462
					echo ">>> ERROR: An error occurred executing post command at pkg final hostname"
1463
					print_error_pfS
1464
				fi
1451 1465
			done
1452 1466
		fi
1453 1467
	done

Also available in: Unified diff