Kieren Posted February 2, 2012 Share Posted February 2, 2012 (edited) Hi all, First of all I'll say hello to everyone since this is my first post I'm having problems starting the server using a web based control panel. I make use of the phpseclib library (http://phpseclib.sourceforge.net/). The following command is used to start the server (for example); The server just won't start, and no log is generated. I can start the server using PuTTY however. nohup ./mta-server >/dev/null 2>&1 & I've used this to start other servers up such as SA-MP and Ventrilo, which works pefectly; but it's MTA that seems to have problems with this. I've seen this issue posted before but there doesn't seem to be a resolution to this? (correct me if I'm wrong). Any help would be grately appreciated. Many thanks Edited February 5, 2012 by Guest Link to comment
Discord Moderators Zango Posted February 2, 2012 Discord Moderators Share Posted February 2, 2012 You can start mta-server with parameter -D to daemonize it, "natural" alternative to nohup and output trashing. While I recommend you use the daemon option, see if this works: nohup ./mta-server > /dev/null 2> /dev/null < /dev/null & Link to comment
Kieren Posted February 2, 2012 Author Share Posted February 2, 2012 Unfortunately that didn't work, I also tried your recommended method but that didn't work either. My last attempt was writing the command in a sh script and executing the script instead (ie ./mta-server.sh) , but that didn't work either. Again, these commands work perfectly when I try this through PuTTy but MTA seems to throw the toys out of the pram (sort of speak!) when using the PHP extension. Rather confusing! Link to comment
Phat Looser Posted February 3, 2012 Share Posted February 3, 2012 apt-get install screen screen -S $SCREEN_NAME -d -m $GAME_PATH$SERVER_FILE Your server runs in a virtual console now. Re-attach to that console with screen -r $SCREEN_NAME get out of it with ctrl+D A Send commands to it with screen -D -r $SCREEN_NAME -p 0 -X stuff "$COMMAND"`echo -ne '\015'` original author: Dragonshadow (for minecraft, don't wanna be stealing the last line of code) sorry to say it that bluntly, but nohub doesn't let you control your servers rite. Link to comment
Kieren Posted February 3, 2012 Author Share Posted February 3, 2012 sorry to say it that bluntly, but nohub doesn't let you control your servers rite. Don't worry about it! I'm actually glad you reminded me about Screen (as daft as it seems, I had forgot about it; it's been a while since I've used it ). Anyway, I've installed Screen and I now start the process in detached mode to begin with. This has fixed the problem, and now the server starts with no problems whatsoever Thank you for your help, appreciate it - Kieren 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