diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-23 22:56:33 -0700 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-28 11:05:40 -0700 |
commit | b102c9b2b3aaa4d66bda8d932ba2d6bd4575c044 (patch) | |
tree | 41bdb9b456cbb8d59aaf421e8c82582a4eabcc55 /entrypoint.sh | |
parent | 796a16c8da1e40aef418559ade2252a5275708c8 (diff) | |
download | homer-b102c9b2b3aaa4d66bda8d932ba2d6bd4575c044.tar.gz homer-b102c9b2b3aaa4d66bda8d932ba2d6bd4575c044.tar.zst homer-b102c9b2b3aaa4d66bda8d932ba2d6bd4575c044.zip |
Regroup all editable files in one place
Diffstat (limited to 'entrypoint.sh')
-rw-r--r-- | entrypoint.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/entrypoint.sh b/entrypoint.sh index 7623322..dd55cdb 100644 --- a/entrypoint.sh +++ b/entrypoint.sh | |||
@@ -1,6 +1,15 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | yes n | cp -i /www/config.yml.dist /www/config.yml | 3 | # Ensure default assets are present. |
4 | while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null | 4 | while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ &> /dev/null |
5 | 5 | ||
6 | darkhttpd /www/ --no-listing --port $PORT | 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 | ||
9 | fi | ||
10 | |||
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 | ||
13 | |||
14 | chown -R $UID:$GID /www/assets/* | ||
15 | exec su-exec $USER:$GROUP darkhttpd /www/ --no-listing --port "$PORT" | ||