rc.local 684 B

12345678910111213141516171819202122232425262728293031
  1. ## some checks specific to SuperGlue
  2. ## where SuperGlue storage is mounted
  3. _SG=/www/htdocs
  4. ## if /www is mounted
  5. mountpoint -q $_SG && (
  6. ## if not writable chown with httpd
  7. [ $(stat $_SG -c %U) != 'httpd' ] && chown -R httpd $_SG
  8. [ $(stat $_SG -c %a) -lt '755' ] && chmod -R u+rwX $_SG
  9. ## check if index.html is present
  10. [ -e $_SG/index.html ] || (
  11. cp /www/lib/resources/index.html $_SG
  12. chown httpd $_SG/index.html
  13. )
  14. ## check symlinking
  15. for i in devTools resources templates; do
  16. [ -L $_SG/$i ] || ln -s /www/lib/$i $_SG/$i
  17. done
  18. ## if /www/tmp does not exist
  19. [ -d /www/tmp ] || (
  20. mkdir /www/tmp && chown httpd /www/tmp
  21. )
  22. )
  23. )
  24. exit 0