#!/bin/sh ## Script for rotating bzfs server maps ## Put seperate config files for each map into a folder and direct CONFIGPATH to it ## or enter the path on the commandline b=0 if [ $1 ]; then CONFIGPATH=$1 else CONFIGPATH="/home/nullbzfl/bzfs/confs/5155/cfg" fi until [ $b -lt 0 ]; do for FILE in $CONFIGPATH/* ; do LOGS=$(dirname $(dirname $FILE))/logs/$(date +%F).bzfs.log mkdir -p $(dirname $LOGS) touch $LOGS /home/nullbzfl/bzfs/bzfs/bin/bzfs -conf $FILE >> $LOGS sleep 3 done done ## Due to my intetionally shoddy until loop this script will never exit. ## You can just update the config files in the path ## and they will be used on the next rotation cycle. ## Don't forget to add -g and -time ???? to the config files.