#!/bin/bash
# restarter script
main() {
while [ 1 ]; do
./tfs > output
done
}
pkill tfs
main
ok so should i use screen, then start the bash script?Code:#!/bin/bash # restarter script main() { while [ 1 ]; do ./tfs > output done } pkill tfs main
This is a bash script. Put it a file ending in .sh and execute it.
It will start/restart whenever it goes off either by a crash or a programed restart in the game.
ok so should i use screen, then start the bash script?
If you want you can use it.
is it needed at all?
Well i dont think it works,I like to use it and monitor my console with the "output" file that is automatically created by the script.
[root@vps21276 tibia]# ./start.shwhat error?
[root@vps21276 tibia]# ./start.sh
-bash: ./start.sh: /bin/bash^M: bad interpreter: No such file or directory
its centos 7, im not even sure what your talking aboutMake sure that end of line is compatible with Unix like systems. If you dont know what that is I suggest you google it.