2020-06-18 14:46:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-11-13 11:12:24 +00:00
|
|
|
# Default assets & example configuration installation
|
2022-06-29 09:58:05 +00:00
|
|
|
if [[ "${INIT_ASSETS}" == "1" ]] && [[ ! -f "/www/assets/config.yml" ]]; then
|
2022-04-10 09:55:11 +00:00
|
|
|
echo "No configuration found, installing default config & assets"
|
2024-11-13 11:12:24 +00:00
|
|
|
if [[ -w "/www/assets/" ]];
|
|
|
|
then
|
|
|
|
while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/
|
|
|
|
yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml
|
|
|
|
else
|
|
|
|
echo "Assets directory not writable, skipping default config install.";
|
|
|
|
echo "Check assets directory permissions & docker user or skip default assets install by setting the INIT_ASSETS env var to 0."
|
|
|
|
fi
|
2021-06-21 17:33:21 +00:00
|
|
|
fi
|
|
|
|
|
2021-12-09 12:09:09 +00:00
|
|
|
echo "Starting webserver"
|
2022-11-18 19:29:12 +00:00
|
|
|
exec lighttpd -D -f /lighttpd.conf
|