adding recursive mkdir flag to precreate hierarchy
authorChris Koeritz <fred@gruntose.com>
Tue, 13 Mar 2018 15:35:55 +0000 (11:35 -0400)
committerChris Koeritz <fred@gruntose.com>
Tue, 13 Mar 2018 15:35:55 +0000 (11:35 -0400)
scripts/site_avenger/shared_site_mgr.sh

index 50ca50da391e4526aa4b830d124a97e33ee5b9cd..4effce3c18a1ee1d1828155ab3409c06703ee42a 100644 (file)
@@ -147,14 +147,14 @@ function fix_site_perms()
   fi
 
   if [ ! -d "$site_dir/logs" ]; then
-    mkdir "$site_dir/logs"
+    mkdir -p "$site_dir/logs"
     test_or_die "Creating logs directory"
   fi
   chmod -R g+w "$site_dir/logs"
   test_or_die "Enabling group write on site's Logs directory"
 
   if [ ! -d "$site_dir/tmp" ]; then
-    mkdir "$site_dir/tmp"
+    mkdir -p "$site_dir/tmp"
     test_or_die "Creating tmp directory"
   fi
   chmod -R g+w "$site_dir/tmp"