• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
Sign in to follow this  
Followers 0
Rob0

MTA CentOs 7.2 VPS Start at boot

2 posts in this topic

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.

Share this post


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.

Share this post


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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.