Is there a proper way to shut down a server?

Hi there everyone!

I’m playing with a development server and I’m having an issue. I ran the server the first time and it connected properly. While it was running, in the terminal, I used CTRL+x to kill the bash command which shut down the server.

Now, however, when I try to start the server back up again, I get :

Restarting the machine gets rid of that error.

I didn’t change anything in the server.cfg concerning the port and I’m not running another server on this machine, I just started this one successfully, killed it with CTRL+x at the command line and now get this error.

Any help would be appreciated!

What OS are you using?

Debian 9

lol20charlol

CTRL+D does it for me.

So killing the process is the only way to stop the server? There’s no shutdown procedure or script (opposite to run.sh) that is used to do this? Killing the process for me is causing the error above so I thought that there might be another way to do this that releases that IP:port.

I wonder how ZAP handles something like this.

ctrl-z (I guess?) doesn’t kill anything, it suspends it.

Oh, that would explain my problem :slight_smile: CTRL+D then is the way to handle it?

ctrl-d or ctrl-c probably would both work

Do you happen to know of a command to use to have the user exit the display of the run.sh command while leaving it running? What I mean by that is when I run the .sh, my terminal shows an updating process of that command. I know how to suspend that command, and how to terminate it thanks to you guys but how do I stop the updating display of the process so I can get my prompt back and do other things in the terminal?

use something like screen