Question
Attempting to run a bash script via user-data on creation isn't working and no logs
On Google/EC2 I run a bash script to setup a server and after reading https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata it seems like I can do that on DigitalOcean too.
I’m running into an issue though where the script isn’t running however and I can’t find where the logs are. On Google/EC2 they’re in /var/log/messages on CentOS but I couldn’t find anything in there on DO and the install.log files in /root/ don’t have anything about the script either.
The user-data I’m trying to run is:
#!/bin/bash
curl {script url} | sh
If I log into the box and run that curl/pipe it works fine. I’m using the Control Panel to create the droplet. Is there something I’m missing? Thanks!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×