[shell] Minetest Server Control (mtctl) [commandline]

Post Reply
User avatar
Miniontoby
Member
Posts: 578
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

[shell] Minetest Server Control (mtctl) [commandline]

by Miniontoby » Post

mtctl: A minetest server control command

Based on: systemctl (linux) and rcctl (openbsd)

Current Version 1.3


Usage:

The mtctl is using the following pattern:

$ mtctl <action> [worldname]
  • action: start|stop|restart|status|create|backup|list|help
  • worldname: worldname to control

Features:

This command has some extra features:
  • Per-user config, so you can run per user your own server
  • Live backup thanks to Minix: You can make backups whilst the server is running (without restart)

Install:

This script is easy to install, thanks to a one-line-installer.

This installer will detect your OS and based on that info it will select which shell you have (and some other things)


The command itself is the following:

$ curl -sSL https://ircforever.org/mtctl.php | $SHELL


Update:

To update the mtctl, just do $ mtctl check_updates, that will check updates and install them when there is a update


Setup worlds:

For existing worlds:

Put your minetest.conf in your worlds/<yourworldname> as world.conf
Also specify the port in the world.conf

For new worlds:

Use $ mtctl create <worldname>
Or use the instruction for the existing worlds


Source:

The source is avaible at https://cvsweb.planetofnix.com/cgi-bin/cvsweb/mtctl

And here you can find the change log



Copyright (C) 2021 by Miniontoby <miniontoby@ircnow.org>

Permission is granted to use, copy, modify, and/or distribute this work for any purpose with or without fee. This work is offered as-is, with absolutely no warranty whatsoever. The author is not responsible for any damages that result from using this work.
Last edited by Miniontoby on Wed Oct 20, 2021 10:26, edited 10 times in total.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Miniontoby
Member
Posts: 578
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [shell] Minetest Server Control (mtctl) [commandline]

by Miniontoby » Post

Version 1.0

The first release version is now officialy out!!!

Check the main topic to see the info about the whole command
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Miniontoby
Member
Posts: 578
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [shell] Minetest Server Control (mtctl) [commandline]

by Miniontoby » Post

Version 1.2

Version 1.2 is out!

It now has the 'mtctl backup <world>' thanks to Minix (check the Features part in the main post for more info)

Btw Version 1.1 was already out, but it had gone a bit wacky, so thats why it doesn't exist

check changelog.txt for the things that have changed
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Miniontoby
Member
Posts: 578
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [shell] Minetest Server Control (mtctl) [commandline]

by Miniontoby » Post

Version 1.3

Version 1.3 is out!

- Fixed installer using root whilst executed as root
- Fixed License
- Updated status command to look like the one at linux
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

c56
Member
Posts: 165
Joined: Wed Apr 21, 2021 03:05
GitHub: tigercoding56
In-game: bm5 or bemo5

Re: [shell] Minetest Server Control (mtctl) [commandline]

by c56 » Post

could you add an action to send / execute chat commands ?
this is a signature if you are interested in the laggiest server ever that i host join zeitsprung the legend continues
also pls klick the link tinyurl.com/notarickroll

c56
Member
Posts: 165
Joined: Wed Apr 21, 2021 03:05
GitHub: tigercoding56
In-game: bm5 or bemo5

Re: [shell] Minetest Server Control (mtctl) [commandline]

by c56 » Post

also does a started world persist across a hardware (sudo reboot ) reboot ?
this is a signature if you are interested in the laggiest server ever that i host join zeitsprung the legend continues
also pls klick the link tinyurl.com/notarickroll

User avatar
Miniontoby
Member
Posts: 578
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [shell] Minetest Server Control (mtctl) [commandline]

by Miniontoby » Post

c56 wrote:
Sun Jul 24, 2022 18:21
could you add an action to send / execute chat commands ?
You will need an external mod to do that since this doesn't use a dbus like way using the --terminal argument that exists without my knowledge, but I still got the mod for it so it would be possible!

EDIT: The mod is named external_cmd, but I think it doesn't exist anymore, but I still got a backup of it. Will upload that mod to here, but yeah I will see how I can solve it
Last edited by Miniontoby on Tue Jul 26, 2022 14:41, edited 1 time in total.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Miniontoby
Member
Posts: 578
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [shell] Minetest Server Control (mtctl) [commandline]

by Miniontoby » Post

c56 wrote:
Sun Jul 24, 2022 18:22
also does a started world persist across a hardware (sudo reboot ) reboot ?
Not yet, but I am working on it
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest