]>
git.immae.eu Git - github/bastienwirtz/homer.git/blob - entrypoint.sh
3 # Ensure default assets are present.
4 while true
; do echo n
; done | cp -Ri /www
/default
-assets/* /www
/assets
/ &> /dev
/null
6 # Ensure compatibility with previous version (config.yml was in the root directory)
7 if [ -f "/www/config.yml" ]; then
8 yes n
| cp -i /www
/config.yml
/www
/assets
/ &> /dev
/null
11 # Install default config if no one is available.
12 yes n
| cp -i /www
/default
-assets/config.yml.dist
/www
/assets
/config.yml
&> /dev
/null
14 # Create symbolic link for hosting in subfolder.
15 if [[ -n "${SUBFOLDER}" ]]; then
16 ln -s /www
"/www/$SUBFOLDER"
17 chown
-h $USER:$GROUP "/www/$SUBFOLDER"
20 chown
-R $UID:$GID /www
/assets
22 echo "Starting webserver"
23 lighttpd
-D -f /lighttpd.conf