TARD wrote:I've never used systemd and having hard time finding good tutorials. I need to know how to create a minetest service/unit, start on boot and restart on crash on ubuntu server 16.04. thank.
# : apt content minetest-server
/.
/etc
/etc/init.d
/etc/init.d/minetest-server
/etc/logrotate.d
/etc/logrotate.d/minetest-server
/etc/minetest
/etc/minetest/minetest.conf
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/minetest-server.service
/lib/systemd/system/minetest-server@.service
/usr
/usr/games
/usr/games/minetestserver
/usr/lib
/usr/lib/minetest
/usr/lib/minetest/minetestserver
/usr/share
/usr/share/doc
/usr/share/doc/minetest-server
/usr/share/doc/minetest-server/changelog.Debian.gz
/usr/share/doc/minetest-server/copyright
/usr/share/doc/minetest-server/README.Debian
/usr/share/man
/usr/share/man/man6
# : systemctl enable minetest-server
# : systemctl start minetest-server
# : cat /lib/systemd/system/minetest-server.service
[Unit]
Description=Minetest multiplayer server minetest.conf server config
Documentation=man:minetestserver(6)
After=network.target
[Service]
Restart=on-failure
User=Debian-minetest
Group=games
ExecStart=/usr/lib/minetest/minetestserver --config /etc/minetest/minetest.conf --logfile /var/log/minetest/minetest.log
[Install]
WantedBy=multi-user.target
TARD wrote:I did apt-get minetest-server, Repo outdated 4.13, but it worked and started on boot. So I changed the directory to my 4.15 dev build, that worked, the .minetest.conf file worked but it's not detecting everything below my /world folder. player files, the map or anything. I've tried moving these folders around with no luck. I'll update this post if I figure it out. I was very tired when doing this stuff so maybe that's what went wrong.
ExecStart=/minetest/bin/./minetestserver --config /etc/minetest/minetest.conf --logfile /var/log/minetest/minetest.log
# : systemctl stop minetest-server.service
# : systemctl disable minetest-server.service
# : cp -av /lib/systemd/system/minetest-server.service /etc/systemd/system/minetest-server.service
# : nano /etc/systemd/system/minetest-server.service
ExecStart=/usr/bin/minetest --server < blah blah other flags and options >
/etc/systemd/system/mt-server-01-CreativeWorld.service
ExecStart=/usr/bin/minetest --server --world /path/to/CreativeWorld --config /path/to/CreativeWorld.conf --logfile /path/to/CreativeWorld.log
/etc/systemd/system/mt-server-02-SurvivalWorld.service
ExecStart=/usr/bin/minetest --server --world /path/to/SurvivalWorld --config /path/to/SurvivalWorld.conf --logfile /path/to/SurvivalWorld.log
/etc/systemd/system/mt-server-03-PvPWorld.service
ExecStart=/usr/bin/minetest --server --world /path/to/PvPWorld --config /path/to/PvPWorld.conf --logfile /path/to/PvPWorld.log
/etc/systemd/system/mt-server-04-MonsterMobsWorld.service
ExecStart=/usr/bin/minetest --server --world /path/to/MonsterMobsWorld --config /path/to/MonsterMobsWorld.conf --logfile /path/to/MonsterMobsWorld.log
Users browsing this forum: No registered users and 15 guests