linux - How to run a shell script at startup for Red Hat 7.3 -


i want run script when rhel 7.3 machine boots up. script restarts docker service , restarts container.

the script:

#!/bin/bash sudo service docker start sleep 10s docker restart free 

how script run every time red hat machine powered on.

one of easiest way add script file /etc/rc.local


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -