From 6c4416b1498b8bfcd823bfe1ed96a3138f284f52 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 22 Mar 2017 16:33:21 +0100 Subject: [PATCH] Change also base directory if requested on commanline. --- cleanup_samba_rights.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cleanup_samba_rights.sh b/cleanup_samba_rights.sh index e0aede1..62d8d58 100755 --- a/cleanup_samba_rights.sh +++ b/cleanup_samba_rights.sh @@ -6,8 +6,12 @@ group=$2 file_perm=${3:-664} dir_perm=${4:-2775} -chmod $dir_perm $base_dir -chgrp $group $base_dir +set_also_base_dir=${5:-false} + +if $set_also_base_dir ; then + chmod $dir_perm $base_dir + chgrp $group $base_dir +fi while IFS='' read -r -d '' filename ; do