#!/bin/bash farmerpath=/var/www/dokuwiki-farm # for each animal reference some of the default configuration files (will be overwritten in the animals) for animalpath in /var/www/{animal1.example.org,animal2.example.org,example.org/custom/path}; do ln -sf $farmerpath/conf/{dokuwiki.php,{acl.auth,local,users.auth}.php.dist} $animalpath/conf/. # invalidate cache touch $animalpath/conf/local.php # remove file (not used anymore) rm $animalpath/conf/msg done # alternatively you can find each folder containing a conf/ directory using this: for animalconf in /var/www/*/conf; do echo $animalconf; done # if this looks ok (dokuwiki-farm/conf/* cant be overwritten anyway by itself), do for animalconf in /var/www/*/conf; do ln -sf $farmerpath/conf/{dokuwiki.php,{acl.auth,local,users.auth}.php.dist} $animalconf/. # invalidate cache touch $animalconf/local.php # remove file (not used anymore) rm $animalconf/conf/msg done