laravel-folder-init-and-clean-cache-should-run-in-docker-root-folder.sh 724 B

12345678910111213141516171819202122232425
  1. #!#/bin/bash
  2. mkdir -p public_html/storage/cms/cache/
  3. mkdir -p public_html/storage/cms/twig/
  4. mkdir -p public_html/storage/cms/combiner/
  5. mkdir -p public_html/storage/framework/cache/
  6. mkdir -p public_html/storage/framework/sessions/
  7. mkdir -p public_html/storage/framework/views/
  8. mkdir -p public_html/storage/logs/
  9. rm -rf public_html/storage/cms/cache/*
  10. rm -rf public_html/storage/cms/twig/*
  11. rm -rf public_html/storage/cms/combiner/*
  12. rm -rf public_html/storage/framework/cache/*
  13. rm -rf public_html/storage/framework/sessions/*
  14. rm -rf public_html/storage/framework/views/*
  15. rm -rf public_html/storage/logs/*
  16. STR=`pwd`
  17. SUB='/home/'
  18. if [[ "$STR" == *"$SUB"* ]]; then
  19. user=${STR/$SUB/}
  20. chown -R $user:apache public_html/*
  21. fi