Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from Griefed/develop
Browse files Browse the repository at this point in the history
Replace check for file and add logging
  • Loading branch information
Griefed authored May 26, 2021
2 parents c9808b6 + 05c3a8d commit 3334938
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions root/etc/cont-init.d/30-install
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ if [ ! -f /config/www/sui.lock ]; then
/config/www/
rm -Rf /tmp/sui
touch /config/www/sui.lock
else
echo "**** lock-file found. Skipping installation... ****"
fi

# Permission Stuffs
Expand Down
12 changes: 9 additions & 3 deletions root/etc/cont-init.d/40-config
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
#!/usr/bin/with-contenv bash

if [ ! -a /config/www/apps.json ]; then
if [ ! -f /config/www/apps.json ]; then
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... ****"
fi


if [ ! -a /config/www/links.json ]; then
if [ ! -f /config/www/links.json ]; then
cp -f \
/defaults/links.json \
/config/www/links.json
else
echo "**** links.json-file found. Skipping installation... ****"
fi


if [ ! -a /config/www/index.html ]; then
if [ ! -f /config/www/index.html ]; then
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... ****"
fi

# Permissions Stuffs
Expand Down

0 comments on commit 3334938

Please sign in to comment.