- Home /
How to shut down an Unity application on Amazon Ubuntu EC2 server ?
Hello community !
I am developing a Unity-Server-Application to run it on an Amazon Ubuntu EC2 server. It success to run it, it works, but I don't know how to shut down it, because I don't have a console of the unity-server-application with -batchmode commend line.
Have you any idea please ?
Answer by ByteSheep · Apr 03, 2014 at 09:13 AM
if you are accessing the Ubuntu server through ssh then you should be able to use the following command to see all running processes:
ps aux
or you can search for just the MasterServer process using:
ps aux | grep MasterServer
the column on the very left is the process id - you need this number to be able to tell the process to quit. So for instance:
ec2-user 21875 0.4 1.9 159464 11636 ? Sl Apr02 1:38 ./MasterServer -p 23466
here 21875 is the pid (process id), so now we can use that to stop the master server:
kill 21875
no when you do:
ps aux | grep MasterServer
you shouldn't get any results any more..
Hope I understood correctly what you are trying to do ;)
Thanks for the answer. But kill commend don't shut down the server I already try it. And i don't want to shut down a $$anonymous$$asterServer but as I said a Unity Application (server). What i am looking for it's to execute Application.Quit() .
if you have access to the command line on the Ubuntu machine then there will definitely be a way to close the application using a command - the kill command should work for any process running..
O$$anonymous$$ just tested closing a standalone unity application using the kill command on mac osx:
So by using the ps aux command you can see the returned listing of the running apllication and it's pid. When you use the kill command with the pid (highlighted in blue) it closes the unity application.
After that when using the ps aux command again the process is no longer running.
If that still doesn't work for you then give me a couple more details of how exactly you are trying to close the game.
Your answer
Follow this Question
Related Questions
Networking Question 1 Answer
Enable logging in custom script (Photon Server) 2 Answers
Unity networking tutorial? 6 Answers
Can I use Unity as a server-side renderer on linux? 0 Answers
Cloud recognition in Vuforia 0 Answers