# ==>> on AMI
# - run pre-bundle scripts, usually located in /etc/ami/bundle.d (as per EC2_REMOTE_SCRIPTS)
# - collect exclude directory information
# - bundle the volume
# - upload the bundle
# - remove the EC2 certificates and their containing directory
$SSH "if [ -d $EC2_REMOTE_SCRIPTS ]; then for script in $EC2_REMOTE_SCRIPTS/*; do if [ -x \$script ]; then \$script; fi; done; fi;" | $NOTIFY
 
$SSH \
  'files="" ;' \
  "for file in `grep -vP '^#|^\s*$' $EC2_REMOTE_EXCLUDE` ; " \
  "  do " \
  '    if [ -e $file ]; ' \
  '    then ' \
  '      if [ -z "$files" ] ; then files="\'$file\'" ; else files=$files",\'$file\'" ; fi;  ' \
  '    fi; ' \
  '  done;' \
  'if [ -n "$files" ] ; then exclude="-e $files" ; else exclude="" ; fi; \
  "echo 'ec2-bundle-vol -d /mnt -k $PEM/pk-*.pem -c $PEM/cert-*.pem -u $AWS_ACCOUNT \$exclude -r $CPU -p $BUNDLE_PREFIX';"

<?PHP
  $Variable = "YAY";
?>

 
sandbox/bash_remote.txt · Last modified: 2010/01/22 20:53 by 207.160.133.172
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki