Skip to content

Commit db49f51

Browse files
committed
fix(sof-start): check index page in specified WEBROOT
1 parent 2fc0b03 commit db49f51

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spaceonfire/bin/sof-start

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ else
3333
WEBROOT=/var/www/html
3434
fi
3535

36-
# Copy default index.html
37-
if [ $(ls /var/www/html/index.{php,htm,html} 2>/dev/null | wc -l) -eq 0 ]; then
38-
cp -f /opt/spaceonfire/html/index.html $WEBROOT
39-
fi
40-
4136
# Recreate nginx user with passed UID and GID
4237
if [ ! -z "$PUID" ]; then
4338
if [ -z "$PGID" ]; then
@@ -52,6 +47,12 @@ if [ -z "$SKIP_CHOWN" ]; then
5247
chown -Rf nginx.nginx /var/www/html
5348
fi
5449

50+
# Copy default index.html
51+
if [ $(ls $WEBROOT/index.{php,htm,html} 2>/dev/null | wc -l) -eq 0 ]; then
52+
cp -f /opt/spaceonfire/html/index.html $WEBROOT
53+
chown -f nginx.nginx "$WEBROOT/index.html"
54+
fi
55+
5556
if [ ! -z "$SOF_PRESET" ]; then
5657
select-preset $SOF_PRESET
5758
fi

0 commit comments

Comments
 (0)