Page 1 of 1

minetest server: request script automatic restart

PostPosted: Sat Jan 02, 2016 17:59
by yngwie123
I need a script to automatically start minetest with ubuntu

Re: minetest server: request script automatic restart

PostPosted: Sat Jan 02, 2016 18:24
by rubenwardy
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

Re: minetest server: request script automatic restart

PostPosted: Sat Jan 02, 2016 19:18
by yngwie123
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