2021-08-28 23:12:30 -05:00

13 lines
357 B
Bash
Executable File

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