Просмотр исходного кода

Rename index.html to index.php

Johannes Zellner 8 лет назад
Родитель
Сommit
f501478436
3 измененных файлов с 4 добавлено и 5 удалено
  1. 1 2
      Dockerfile
  2. 0 0
      index.php
  3. 3 3
      start.sh

+ 1 - 2
Dockerfile

@@ -73,8 +73,7 @@ ADD supervisor/ /etc/supervisor/conf.d/
 RUN sed -e 's,^logfile=.*$,logfile=/run/supervisord.log,' -i /etc/supervisor/supervisord.conf
 
 # add code
-ADD index.html /app/code/index.html
-ADD start.sh /app/code/start.sh
+COPY start.sh index.php /app/code/
 
 # make cloudron exec sane
 WORKDIR /app/data

+ 0 - 0
index.html → index.php


+ 3 - 3
start.sh

@@ -6,7 +6,7 @@ mkdir -p /app/data/public /run/apache2 /run/proftpd /run/app
 
 # check if any index file exists
 for f in /app/data/public/index.*; do
-    [ -e "$f" ] && echo "Do not override existing index file" || cp /app/code/index.html /app/data/public/index.html
+    [ -e "$f" ] && echo "Do not override existing index file" || cp /app/code/index.php /app/data/public/index.php
     break
 done
 
@@ -35,10 +35,10 @@ else
         -e "s/##LDAP_GID/$(id -g www-data)/g" \
         /app/code/proftpd.conf.template > /run/proftpd/proftpd.conf
 
-    if [[ -f /app/data/public/index.html ]]; then
+    if [[ -f /app/data/public/index.php ]]; then
         sed -e "s,##SFTP_PORT,${SFTP_PORT}," \
             -e "s,##SFTP_DOMAIN,${APP_DOMAIN}," \
-            -i /app/data/public/index.html
+            -i /app/data/public/index.php
     fi
 fi