[REL] Bash script to install, configure and manage servers

Recommended Posts


mtasamanager.sh is a standalone Linux bash script that installs, configures and runs a Multi Theft Auto: San Andreas server.

The script is able to detect the right packages to be installed on the server, download MTA:SA linux server files and default resources, install them, prompt for the correct configuration such as server name, ports, password... If the script detects an installed server, it will check if the server is running or not, and then ask if it should start or stop the server.

It was tested on 32 and 64 bit Debian 7 servers. It should also work on Ubuntu distributions.

How to use it:

Just place mtasamanager.sh on the directory where you want the server to be installed and run it:

chmod +x mtasamanager.sh 

Then just follow the instructions. Execute the script again if you want to start or stop the server.


Ideas and suggestions are welcome. I never made anything with shell scripts before. So it may be definitely not good enough.

Share this post

Link to post

Good job, this will be very useful for people not familiar with the Linux environment.

Share this post

Link to post

I used this for installing a test server and it worked flawlessly.

One suggestion would be to pipe the output to a log file rather than /dev/null - So if it does go wrong, there is something to look at.

Share this post

Link to post

./mta.sh ?

Also, will it attempt to install zip, unzip, etc.. each time someone wants to create a new server?

Share this post

Link to post

Only issue I ran into is that when you list Y/n that typically means that Yes is the default option, so return should allow it to just proceed.

For anyone confused on how to use this, you can grab the file from https://raw.githubusercontent.com/pablo ... manager.sh using wget.

wget [url=https://raw.githubusercontent.com/pablophg/mtasamanager.sh/master/mtasamanager.sh]https://raw.githubusercontent.com/pablo ... manager.sh[/url] 

I then had to set the file permissions.

chmod u+x mtasamanager.sh 

Then you can execute using this


Remember, it installs to current directory. I'd recommend placing it in the home folder for the current user like so


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

  • Recently Browsing   0 members

    No registered users viewing this page.