diff --git a/scripts/init.sh b/scripts/init.sh index d555c4d..f64cbab 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -55,6 +55,10 @@ if [[ ! -z "${TYPECHO_INSTALL}" && "${TYPECHO_INSTALL}" = "1" ]]; then su -p www-data -s /usr/bin/env php /app/install.php fi +if [[ ! -z "${TYPECHO_SECURE}" && "${TYPECHO_SECURE}" = "1" ]]; then + echo 'define('__TYPECHO_SECURE__',true);' >>/app/config.inc.php +fi + if [ "$1" = "apache" ]; then apachectl -D FOREGROUND elif [ "$1" = "fpm" ]; then @@ -63,4 +67,4 @@ elif [ "$1" = "cli" ]; then su -p www-data -s /bin/ -c '/usr/bin/env php' else su -p www-data -s /bin/ -c '/usr/bin/env php -S 0.0.0.0:80 -t /app' -fi \ No newline at end of file +fi