#!/bin/bash # # Generate all logs files needed in lwat. # # Author: Jose Ricardo Pla Pons # 15 Sep'08 set -e FILES="lwat_alumnos lwat_profesores lwat_otros macs_id users_id prebackend" DIR='/var/log/lliurex-lwatlogs' if [ -d $DIR ]; then for i in $FILES; do touch $DIR/$i chown www-data:www-data $DIR/$i chmod 600 $DIR/$i done chown www-data:www-data $DIR chmod 700 $DIR else mkdir -p $DIR for i in $FILES; do touch $DIR/$i chown www-data:www-data $DIR/$i chmod 600 $DIR/$i done chown www-data:www-data $DIR chmod 700 $DIR fi #DEBHELPER#