Create server from command line

Hi,
I want to create server from command line (mineos_console.py), but i can’t set profile.
What I tried:
mineos_console.py -s test create -> {create} completed successfully.
mineos_console.py -s test set profile spigot -> RuntimeError: Server must be running to perform this action.
mineos_console.py -s test start -> RuntimeError: Server is not assigned a valid profile.

Also,
mineos_console.py -s test change_sp server-port 25566 -> RuntimeError: Server must be running to perform this action.
I can’t start it (I set profile manually just to test this), because there is another server running on that port.

Is create accepting some arguments so I can put port and profile there?

Thanks,
ano95

I’m not sure set profile spigot was meant to work; there’s no ‘set profile’ or change_sp commands that ./mineos_console.py accepts.

I haven’t worked with the python codebase in a long time, but what I think should work for this is:

mineos_console.py -s test create
mineos_console.py -s test profile spigot
mineos_console.py -s test start
mineos_console.py -s test modify_config server-port 25566

Where did you get your commands from?

From wiki:
http://minecraft.codeemo.com/mineoswiki/index.php?title=0.5.0#mineos_console.py_syntax

But thanks,
It is working now :smile:

Great catch, thanks for letting me know. Over time, the wiki definitely fell behind the codebase…

Also, how I can modify java_xmx and java_xms from command line?

mineos_console.py -s test modify_config java java_xmx 2048

I think this should work.

It is not working :frowning:
/usr/games/minecraft/mineos_console.py -s test modify_config java java_xmx 2048
Output:
Traceback (most recent call last):
File “/usr/games/minecraft/mineos_console.py”, line 67, in
retval = getattr(instance, args.cmd)(*arguments)
File “/usr/games/minecraft/mineos.py”, line 43, in wrapper
fn(self, *args, **kwargs)
File “/usr/games/minecraft/mineos.py”, line 323, in modify_config
sc[section:option] = value
File “/usr/games/minecraft/conf_reader.py”, line 146, in __ setitem __
raise KeyError(‘No section called %s’ % option.start)
KeyError: ‘No section called 2048’

Oh, then I think I just got them reversed:

mineos_console.py -s test modify_config java_xmx 2048 java

Section last, which I forgot was the case because section missing == server.properties, section present == server.config.