Skip to content
Snippets Groups Projects
40-config 772 B
Newer Older
Griefed's avatar
Griefed committed
#!/usr/bin/with-contenv bash

if [ ! -f /config/www/apps.json ]; then
Griefed's avatar
Griefed committed
  cp -f \
    /defaults/apps.json \
    /config/www/apps.json
  sed -i \
    "s/DOMAIN/${DOMAIN}/g" \
      /config/www/apps.json
else
  echo "**** apps.json-file found. Skipping installation... ****"
if [ ! -f /config/www/links.json ]; then
Griefed's avatar
Griefed committed
  cp -f \
    /defaults/links.json \
    /config/www/links.json
else
  echo "**** links.json-file found. Skipping installation... ****"
if [ ! -f /config/www/index.html ]; then
Griefed's avatar
Griefed committed
  cp -f \
    /defaults/index.html \
    /config/www/index.html
  sed -i \
    "s/PROTOCOL/${PROTOCOL}/g" \
      /config/www/index.html
else
  echo "**** index.html-file found. Skipping installation... ****"
Griefed's avatar
Griefed committed
fi

# Permissions Stuffs
chown -R \
  abc:abc \
    /config/www