proper check for non-empty index.html
This commit is contained in:
parent
41f2d3e480
commit
30b05467d7
|
@ -320,7 +320,7 @@ CADDY_EOF
|
|||
$sudo_cmd chmod 755 $PREFIX/srv/www
|
||||
$sudo_cmd chmod 755 $PREFIX/srv/www/localhost
|
||||
|
||||
if [ ! -f "$PREFIX/srv/www/localhost/index.html" ] || [ -z "$(cat $PREFIX/srv/www/localhost)" ]; then
|
||||
if [ ! -f "$PREFIX/srv/www/localhost/index.html" ] || [ -z "$(cat $PREFIX/srv/www/localhost/index.html)" ]; then
|
||||
$http_get $http_opts "$caddy_localhost_index" $http_out $PREFIX/tmp/$caddy_dir/index.html
|
||||
$sudo_cmd mv $PREFIX/tmp/$caddy_dir/index.html $PREFIX/srv/www/localhost/
|
||||
$sudo_cmd chown -R $caddy_user:$caddy_group $PREFIX/srv/www/localhost/
|
||||
|
|
Loading…
Reference in New Issue