#! /bin/bash

# metalog-createdirs
# Creates all directories specified in metalog.conf, owned by root:adm mode 750
# It's a pain in the arse to do it by hand!

set -e

for x in `grep logdir /etc/metalog.conf | tr -d '"' | sed 's/.*=//' `
do
        sudo mkdir --mode=750 -p $x
        sudo chgrp adm $x
done
