Browse Source

improve docker entrypoint

master
filesite 4 months ago
parent
commit
a0b647362b
  1. 18
      docker-entrypoint.sh

18
docker-entrypoint.sh

@ -1,16 +1,14 @@ @@ -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

Loading…
Cancel
Save