Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = <<< EOT
- #cloud-config
- bootcmd:
- - echo "test" > /root/test_user_data
- EOT;
- echo base64_encode($str);
- ?>
- and then
- update instances set user_data="I2Nsb3VkLWNvbmZpZwpib290Y21kOgogLSBlY2hvICJ0ZXN0IiA+IC9yb290L3Rlc3RfdXNlcl9kYXRh" where uuid='bc7f3eae-2da5-4b6f-bfc2-21cdceb21b2e';
- on REBOOT, the vm grabs the user_data and runs it again
- I can see a file in /root/test_user_data.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement