Skip to main content

Overview

After starting McDis-RCON with mcdis run, you can control processes using interactive console commands from your terminal.

Available Commands

All console commands can be entered at the >> prompt after McDis-RCON starts.

Start Commands

start-all
command
Start all configured processes (servers and networks)
>> start-all
Output: ✔ Initializing processes.
start <name>
command
Start a specific process by name
>> start SMP
Output: ✔ [SMP]: Initializing process.

Stop Commands

stop-all
command
Gracefully stop all running processes using their configured stop_cmd
>> stop-all
Output: ✔ Stopping processes.
stop <name>
command
Gracefully stop a specific process
>> stop SMP
Output: ✔ [SMP]: Stopping process.

Kill Commands

kill-all
command
Force-kill all running processes immediately
>> kill-all
Output: ✔ Forcibly stopped processes.
This terminates processes without graceful shutdown. Use only when processes are unresponsive.
kill <name>
command
Force-kill a specific process
>> kill SMP
Output: ✔ [SMP]: Forcibly stopped process.

Restart Commands

restart-all
command
Restart all running processes (stop then start)
>> restart-all
Output: ✔ Restarting processes...
restart <name>
command
Restart a specific process
>> restart SMP
Output: ✔ [SMP]: Restarting process...

Plugin & Addon Management

mdreload-all
command
Reload mdplugins for all processes
>> mdreload-all
Output: ✔ Reloading mdplugins...
This reloads plugins from each process’s .mdplugins/ directory without restarting the process.
mdreload <name>
command
Reload mdplugins for a specific process
>> mdreload SMP
Output: ✔ [SMP]: Reloading mdplugins...
adreload
command
Reload global mdaddons from .mdaddons/ directory
>> adreload
Output: ✔ Reloading mdaddons...

Utility Commands

status
command
Display the control panel status in terminal
>> status
Shows the current panel embed with process states
exit
command
Gracefully shut down McDis-RCON
>> exit
  1. Stops all processes
  2. Waits up to 60 seconds for shutdown
  3. Force-kills unresponsive processes
  4. Exits the application

Command Source Code

From /home/daytona/workspace/source/mcdis_rcon/classes/McDisClient.py:338-469:
async def console_interface(self, command: str):
    if self.is_command(command.lower(), 'start-all', console = True):
        print(self._('✔ Initializing processes.'))
        for process in self.processes: 
            process.start()
            
    elif self.is_command(command.lower(), 'stop-all', console = True):
        print(self._('✔ Stopping processes.'))
        for process in self.processes: 
            process.stop()
    
    # ... additional commands

Error Messages

Process Not Found

✖ Specify the process. E.g.: `start <name>` or `start-all`.

Process Already Running

✖ [SMP]: The process was already open.

Process Not Running

✖ [SMP]: The process was not open.

Invalid Command

✖ Invalid command `xyz`.

Console Listener Loop

The console continuously prompts for commands:
def console_listener(self):
    try:
        while True:
            print('\n' + self._('Commands') + self._(': start, stop, restart, kill, mdreload, adreload, status, exit'))
            command = input('>>')
            asyncio.run_coroutine_threadsafe(self.console_interface(command), self.loop)
            time.sleep(3)
    except:
        pass

Example Session

Commands: start, stop, restart, kill, mdreload, adreload, status, exit
>> start SMP
 [SMP]: Initializing process.

Commands: start, stop, restart, kill, mdreload, adreload, status, exit
>> status
[Panel display appears]

Commands: start, stop, restart, kill, mdreload, adreload, status, exit
>> mdreload SMP
 [SMP]: Reloading mdplugins...

Commands: start, stop, restart, kill, mdreload, adreload, status, exit
>> stop SMP
 [SMP]: Stopping process.

Commands: start, stop, restart, kill, mdreload, adreload, status, exit
>> exit
Closing processes...
Processes closed.

Best Practices

Use stop instead of kill whenever possible to allow servers to save data properly.
Reload plugins with mdreload after making changes to .mdplugins/ files without restarting the server.
The kill command terminates processes immediately, which may cause data corruption or loss.

Next Steps

Panel Commands

Learn Discord panel commands

Process Manager

Understanding process lifecycle

Build docs developers (and LLMs) love