From 30b05467d7fe7af6b0558a9b79eb7aaaf1f68407 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 21 Apr 2017 01:02:55 -0600 Subject: [PATCH] proper check for non-empty index.html --- install-caddy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-caddy b/install-caddy index d52c2ef..102956a 100755 --- a/install-caddy +++ b/install-caddy @@ -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/