I am using the Digital Ocean API to create a couple of Droplets(their name for a server).
These droplets can take user metadata which is basically a file with shell commands that I want to run to provision the server on creation.
An example is given here:
https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata
To be blunt, I just need to check if the bash script successfully ran. I know a couple of cumbersome ways I might check this but I am hoping there would be something easier.
I guess the easiest would be to view the history of commands that ran on the machine or something like that. Is that possible for commands that ran from a shell script?
I know the history
command, but that only works for commands entered while ssh'ed
into the machine. This does not actually show commands from my bash script.
Hopefully somebody knows a quick and easy way to view all commands that ran on the machine.
Cheers.