mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-01-23 02:15:09 +00:00
Regroup all editable files in one place
This commit is contained in:
parent
796a16c8da
commit
b102c9b2b3
11 changed files with 29 additions and 23 deletions
|
|
@ -1,6 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
yes n | cp -i /www/config.yml.dist /www/config.yml
|
||||
while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null
|
||||
# Ensure default assets are present.
|
||||
while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ &> /dev/null
|
||||
|
||||
darkhttpd /www/ --no-listing --port $PORT
|
||||
# Ensure compatibility with previous version (config.yml was in the root directory)
|
||||
if [ -f "/www/config.yml" ]; then
|
||||
yes n | cp -i /www/config.yml /www/assets/ &> /dev/null
|
||||
fi
|
||||
|
||||
# Install default config if no one is available.
|
||||
yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null
|
||||
|
||||
chown -R $UID:$GID /www/assets/*
|
||||
exec su-exec $USER:$GROUP darkhttpd /www/ --no-listing --port "$PORT"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue