Stackscript, on existing Linode after reboot/restart?
I see my StackScript will run after a new instance is created, on bootup
BUT… i want to attach a StackScript to an existing instance and run on start up of my existing instance
is this possible, how ?
thanks
1 Reply
StackScripts are designed specifically for deploying new services, so there's not an direct way to run one on an existing server using Cloud Manager or the Linode API the way you would when creating a new server with that script. That said, it's possible to have a script run when your server starts up, so you can probably find a way to make this work.
We have a previous post that goes over this in a lot of detail, which you can find here:
Depending on how complex the script is, it may be more straightforward. If the script doesn't require the kinds of replacements mentioned in that post, you may just be able to copy and paste the contents into a file and then add a cron job using @reboot
statement to have it run at startup. You can read more about that in our guide to Cron Jobs.
Here are some additional 3rd Party resources that may help with this: