rc.local 562 B

1234567891011121314151617181920212223242526
  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. ## if /www/tmp does not exist
  15. [ -d /www/tmp ] || (
  16. mkdir /www/tmp && chown httpd /www/tmp
  17. )
  18. )
  19. )
  20. exit 0