minetest server: request script automatic restart

User avatar
yngwie123
Member
 
Posts: 109
Joined: Sat Aug 16, 2014 14:54
In-game: yngwie123

minetest server: request script automatic restart

by yngwie123 » Sat Jan 02, 2016 17:59

I need a script to automatically start minetest with ubuntu
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: minetest server: request script automatic restart

by rubenwardy » Sat Jan 02, 2016 18:24

Based on an old version of VanessaE's server restart scripts.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
#!/bin/bash

MOREDEBUG='logs/alldebug.txt'

while true
      do

   DATE=$(date +%Y_%m_%d_%H_%M_%S)

        echo "----------------------" >>$MOREDEBUG
        echo "Server restarted at "`date` >>$MOREDEBUG
        echo "----------------------" >>$MOREDEBUG

   ./bin/minetestserver \
      --port 30000 \
      --logfile logs/debug_$DATE.txt

   sleep 5
done &>> $MOREDEBUG
 

User avatar
yngwie123
Member
 
Posts: 109
Joined: Sat Aug 16, 2014 14:54
In-game: yngwie123

Re: minetest server: request script automatic restart

by yngwie123 » Sat Jan 02, 2016 19:18

rubenwardy wrote:Based on an old version of VanessaE's server restart scripts.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
#!/bin/bash

MOREDEBUG='logs/alldebug.txt'

while true
      do

   DATE=$(date +%Y_%m_%d_%H_%M_%S)

        echo "----------------------" >>$MOREDEBUG
        echo "Server restarted at "`date` >>$MOREDEBUG
        echo "----------------------" >>$MOREDEBUG

   ./bin/minetestserver \
      --port 30000 \
      --logfile logs/debug_$DATE.txt

   sleep 5
done &>> $MOREDEBUG


tanks
 


Return to Minetest Servers

Who is online

Users browsing this forum: No registered users and 28 guests

cron