SUICIDE LINUX: BATTLE ROYALE http://slbr.tildeverse.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
551 B

#!/bin/sh
LOG="log.txt"
death_pid=""
score_pid=""
log_pid=""
cleanup() {
rkill $death_pid >/dev/null 2>&1
rkill $score_pid >/dev/null 2>&1
rkill $log_pid >/dev/null 2>&1
}
trap 'cleanup' 1 2 3 9
servers/deathlistener.sh 1337 & death_pid="$!"
echo "death listener pid: $death_pid" >> "$LOG"
servers/scoreboard.sh 1338 & score_pid="$!"
echo "scoreboard server pid: $score_pid" >> "$LOG"
servers/gamelog.sh 1339 & log_pid="$!"
echo "log server pid: $log_pid" >> "$LOG"
printf "\e[0;91mReading log, exit to stop game\e[0m\n"
tail -f "$LOG"