#!/bin/bash SERVENAME=`cat outputfile` while bzfs -conf $SERVENAME -loadplugin /path/to/confchangeplugin.so,/path/to/outputfile,/path/to/file/that/contains/configs/conffile ; sleep 5 do SERVENAME=`cat /path/to/outputfile` done