forked from bastienwirtz/homer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
18 lines (16 loc) · 723 Bytes
/
entrypoint.sh
File metadata and controls
18 lines (16 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Default assets & example configuration installation
if [[ "${INIT_ASSETS}" == "1" ]] && [[ ! -f "/www/assets/config.yml" ]]; then
echo "No configuration found, installing default config & assets"
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
fi
echo "Starting webserver"
exec 3>&1
exec lighttpd -D -f /lighttpd.conf