13 lines
357 B
Plaintext
Raw Normal View History

#!/bin/sh
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then echo "usage: automat server username password"; exit 1; fi
2020-11-14 04:11:08 +01:00
pwf=~/.mtpw
srv=$1
usr=$2
pas=$3
2020-11-14 15:54:35 +01:00
logfile=$HOME/.wslog
mtpath=$(dirname $0)
2020-11-14 04:11:08 +01:00
if [ -f $pwf ]; then pas=$(cat $pwf); fi
while true; do
2020-11-14 15:54:35 +01:00
$mtpath/bin/minetest --go --address $srv --name $usr --password $pas --logfile $logfile --color never
done