<RESOLVED> Silly Q: how to restart server in terminal?

Kahless61

New Member
Jul 29, 2019
249
0
0
I have a ftb server on creeperhost (so this might be geared more towards people familiar with creeperhost), and when the server needs a restart I always do it through the Control Panel. It works great, but if I'm working in the terminal it's a little inconvenient to have to login to the control panel just to issue a restart, so I was wondering how the equivalent would be done from the terminal? Is there a script I'd call?

Much appreciated.
 

Connor Gavitt

New Member
Jul 29, 2019
1,091
-1
0
Unless your using a control panel with terminal command like /restart (McMyAdmin does this) you have to stop it then start it.
 

Kahless61

New Member
Jul 29, 2019
249
0
0
So how do I stop it and start it from the command line? That's actually even better, because I need to do that when I do upgrades - stop the server, backup, move over upgrades, and start again. Currently I do everything through the terminal except the stop and start part, so being able to do that from the terminal too is my goal here.
 

TheDJParadox

New Member
Jul 29, 2019
117
0
0
CreeperHost's server usually run in screen instances.

Log into SSH (Anything you break in SSH you're responsible for)

screen -r minecraft (to get into the screen instance)

Then you should be in the console. Stop to stop. Type the start script to start. Shouldn't be too complicated. Don't go messing with SSH unless you are ABSOLUTELY sure you won't break something and you are prepared to pay the extended support fee if you do break something.
 

Kahless61

New Member
Jul 29, 2019
249
0
0
That's what I'm looking for, awesome.
What/where is the "start script"?
And not to worry, I'm only doing things I'm 100% comfortable doing and would never have to worry about needing support for. That's exactly why I wanted to ask here about stopping/starting instead of going in and experimenting around trying to figure it out myself :p
 

Thewiserbradley

New Member
Jul 29, 2019
1
0
0
Kahless61 if you need help, I will be more than happy to give you a hand. I look after dedicated servers my self so i do know how to use terminal.
Add me on Skype if you want a hand
Skype: Reecey01429
 

Kahless61

New Member
Jul 29, 2019
249
0
0
All I need to know is what/where the "start script" is or how to start the server - which is easy enough to type out or copy here into a thread reply - I don't need skype help as I'm more than competent at server administration. Thanks for the offer though.
 

Kahless61

New Member
Jul 29, 2019
249
0
0
I found out how. For those who are interested:
0) If you screw up, you've voided your warranty and can't get help from creeperhost. If you're not sure, don't do it.
1) Everything should be done as the "minecraft" user.
2) There is a screen session for the minecraft console. From there, you can simply issue the "stop" command. Of course, you could also "stuff" it to the screen.
2b) In order to interact with a screen from your terminal, you may need to give the "minecraft" user permission on /dev/pts/2. If it complains about it, you know what to do.
3) To run the server, I simply copied the command that was used to run the already-launched instance, as seen in ps -ef
 
  • Like
Reactions: N-kay

N-kay

New Member
Jul 29, 2019
21
0
0
Interesting stuff. I recently got a creeperhost server and was wondering why there was no screen session under root, because that was the only SSH login listed under 'Remote Access Details' in my CP.
Then I thought the minecraft user was just for 'them' to start the server and they don't want me to interfere and change the arguments.

But after your post I realised that it's probably even the same password, and it was, great! Now I can finally just use putty to access the minecraft console.

Oh and thanks to the "ps -ef" command I didn't know about, I finally saw the arguments my sever gets launched with. Quite a lot of them, actually. And the max heap size is set to 5 gig even though I have the 6 gig package, but I guess the vserver itself and the other services I run on there( apache, TS3 etc) need some resources, too.

Still weird though that there is no real startscript anywhere, my guess is that they just issue out the command directly via the CP somehow
 

Connor Gavitt

New Member
Jul 29, 2019
1,091
-1
0
First DO NOT EVER let anyone ssh into your server that asks for it unless they are from the host.

Second login to ssh and do the command

screen -ls

It will list any screens running. Next thing to do is find the name if the screen with the minecraft server and do

screen -r nameofserverscreen

then to stop it you can do the command

stop or /stop in game as op

Then to start it find the directory with the end raft ServerStart.sh or ServerStart.bat or the one creeper host provides if they do and execute it to start it

You can execute it with bash like this

screen -S minecraftserver ./ServerStart.sh Or .bat

Then it will start the server.
 

Kahless61

New Member
Jul 29, 2019
249
0
0
Connor, we already resolved this. See my post.
Additionally, screen -ls will not list the screen because it is under a different user account than what you typically log in as. To resolve this, sudo minecraft.
Finally, creeperhost does not seem to provide any sort of ServerStart.sh or .bat or such anywhere; it seems the web interface invokes the command via hard-code, not via script. To find the full command, do a ps -ef, as I said above.
 
  • Like
Reactions: N-kay

TheDJParadox

New Member
Jul 29, 2019
117
0
0
Even though it's resolved. In the case you're still unsure of the start script. Just use the start command that's used for starting a minecraft server (can be found on Google.) CreeperHost's panel monitors servers that are running in the 'minecraft' screen.

Apologies for not replying to the post you added after my last. I've been without internet for a bit :(