Run an .sh script after the server has booted

Hey All,

I have a question. How do I go about running a .sh file automatically on server boot? The file needs to run after docker has booted or started.

Currently running ubuntu server

Thanks

1 Reply

The way to do this is to create a systemd service that runs at boot time:

https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6

You can make your service dependent on (successful) docker startup.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct