0

Need to run scripts in user data on specific instance behaivor, like example:

"In my script there are certain portion that's need to be run on initial launch of instance and don't execute this script on reboot or start state"

"The other part of script should execute on initial launch and on reboot or started state"

Is that possible ?

Raino
  • 11
  • 1
  • Related: [amazon ec2 - How do I make cloud-init startup scripts run every time my EC2 instance boots? - Stack Overflow](https://stackoverflow.com/questions/6475374/how-do-i-make-cloud-init-startup-scripts-run-every-time-my-ec2-instance-boots) – John Rotenstein Apr 04 '19 at 10:27
  • @JohnRotenstein Thank you :) – Raino Apr 04 '19 at 13:29
  • 1
    Use the part of your script that should only once as the init-script. Also, in the init-script, add a init.d script that should run on every reboot. – rdas Apr 04 '19 at 17:11

0 Answers0