1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- ## some checks specific to Superglue
- ## where Superglue storage is mounted
- _SG=/www/htdocs
- ## mount if needed
- mountpoint -q $_SG || block mount $_SG
- ## if /www is mounted
- mountpoint -q $_SG && (
- ## if not writable chown with httpd
- [ $(stat $_SG -c %U) != 'httpd' ] && chown -R httpd $_SG
- [ $(stat $_SG -c %a) -lt '755' ] && chmod -R u+rwX $_SG
- ## check if index.html is present
- [ -e $_SG/index.html ] || (
- cp /www/lib/resources/index.html $_SG/default.html
- chown httpd $_SG/default.html
- )
- ## check for log directory
- [ -e $_SG/log ] || ( mkdir $_SG/log
- chown httpd $_SG/log
- }
- ## check for tmp directory
- [ -e $_SG/tmp ] || ( mkdir $_SG/tmp
- chown httpd $_SG/tmp
- }
- ## check symlinking
- # for i in devTools resources templates; do
- # [ -L $_SG/$i ] || ln -s /www/lib/$i $_SG/$i
- # done
- ## if /www/tmp does not exist
- # [ -d $_SG/tmp ] || (
- # mkdir $_SG/tmp && chown httpd $_SG/tmp
- # )
- )
- exit 0
|