From a0b647362bd62983b8c935f1be9cc4805c7b7c57 Mon Sep 17 00:00:00 2001 From: filesite Date: Sun, 14 Jul 2024 11:40:55 +0800 Subject: [PATCH] improve docker entrypoint --- docker-entrypoint.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 89a71f0..48bc494 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,16 +1,14 @@ #!/bin/sh theme=$1 -if [ ! -d "/var/www/machete/themes/${theme}/" ]; then - theme=webdirectory -fi - -echo "Theme chosed [${theme}]." +if [ -d "/var/www/machete/themes/${theme}/" ]; then + echo "Theme chosed [${theme}]." -## 复制对应皮肤的配置文件 -cd /var/www/machete/runtime/ -rm -f custom_config.json -cp "../conf/custom_config_${theme}.json" ./custom_config.json -chown apache:apache custom_config.json + ## 复制对应皮肤的配置文件 + cd /var/www/machete/runtime/ + rm -f custom_config.json + cp "../conf/custom_config_${theme}.json" ./custom_config.json + chmod 777 custom_config.json +fi ## 启动samba if [ -e /usr/sbin/smbd ]; then