12345678910111213141516171819202122232425262728293031323334353637383940 |
- set -o xtrace
- _WWW="/www"
- n=0
- while ! mountpoint -q $_WWW; do [ $n -gt 30 ] && exit 1;
- sleep 1
- let n++
- done
- unset n
- _HTDOCS="$_WWW/htdocs"
- [ -e $_HTDOCS ] || mkdir $_HTDOCS
- [ $(stat $_HTDOCS -c %U) == 'httpd' ] || chown -R httpd $_HTDOCS
- [ ! $(stat $_HTDOCS -c %a) -lt '755' ] || chmod -R u+rwX $_HTDOCS
- [ -e $_HTDOCS/index.html ] || (
- cp /opt/lib/resources/demo.html $_HTDOCS/default.html
- chown httpd $_HTDOCS/default.html
- )
- [ -e $_WWW/log ] || (
- mkdir $_WWW/log
- chown httpd $_WWW/log
- )
- [ -e $_WWW/tmp ] || (
- mkdir $_WWW/tmp
- chown httpd $_WWW/tmp
- )
|