Jump to content

MTA CentOs 7.2 VPS Start at boot


Recommended Posts

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 post

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 post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...