I am new to rails & I am trying to achieve the bellow scenario
Lets say I have a Model called Sites with Field domain name. & created an entry with domain name "example.com" & It stored to database.
So Now what I am trying to do is after save it will trigger a command to create a Nginx server block with the given Domain name "example.com" right from rails app.
I know Little bit of shell scripting but don't know how I can run the script from rails based on the data saved on rails db.
Any guideline or Code snippets would be very helpful,