vikas-anand-vst-au4 / awsuserdataeverytimerun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awsuserdataeverytimerun

How can I utilize user data to automatically run a script with every restart of my Amazon EC2 Linux instance?

Content-Type: multipart/mixed; boundary="//" MIME-Version: 1.0

--// Content-Type: text/cloud-config; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cloud-config.txt"

#cloud-config cloud_final_modules:

  • [scripts-user, always]

--// Content-Type: text/x-shellscript; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="userdata.txt"

#!/bin/bash /bin/echo "Linux World" >> /tmp/testfile.txt --//--

About