Rob0 Posted November 10, 2016 Share Posted November 10, 2016 Have got MTA running fine on my CentOs7 VPS. I would like to know how to best auto start MTA for 24/7 operation on all occasions of server startup/reboot/crash? And should/could it be started as a user? And I would like it start in a screen that is minimized but re-attachable. Link to comment
Mr_Moose Posted November 12, 2016 Share Posted November 12, 2016 For that you could use a cronjob: cron -e Then enter something like this: @reboot screen -S NAME_OF_SCREEN_SESSION -dm /path/to/mta-server && screen -S NAME_OF_SCREEN_SESSION -X quit On the last line, that will launch your server in a screen session and detach as soon your physical server is started or rebooted. If you wish to reboot after a crash you need to find some kind of event for that or use polling in a cron to see if the server is still running. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now