]> git.immae.eu Git - github/bastienwirtz/homer.git/blame_incremental - entrypoint.sh
Bump dns-packet from 1.3.1 to 1.3.4
[github/bastienwirtz/homer.git] / entrypoint.sh
... / ...
CommitLineData
1#!/bin/sh
2
3# Ensure default assets are present.
4while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ &> /dev/null
5
6# Ensure compatibility with previous version (config.yml was in the root directory)
7if [ -f "/www/config.yml" ]; then
8 yes n | cp -i /www/config.yml /www/assets/ &> /dev/null
9fi
10
11# Install default config if no one is available.
12yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null
13
14chown -R $UID:$GID /www/assets
15exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT"