This commit is contained in:
2021-09-27 09:02:24 -04:00
parent 7d405a5839
commit 02ff0d0b6a
4 changed files with 470 additions and 0 deletions

28
lufi/startup.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
# addgroup -g ${GID} lufi && adduser -H -s /bin/sh -D -G lufi -u ${UID} lufi
cd /usr/lufi
# mkdir -p data files /themes
# chown -R lufi:lufi . /themes
# Outputting directly to lufi.conf using "sed -i" when mounted with docker fails.
echo "$(sed \
-e 's|<secret>|'${SECRET}'|' \
-e 's|<contact>|'${CONTACT}'|' \
-e 's|<max_file_size>|'${MAX_FILE_SIZE}'|' \
-e 's|<webroot>|'${WEBROOT}'|' \
-e 's|<default_delay>|'${DEFAULT_DELAY}'|' \
-e 's|<max_delay>|'${MAX_DELAY}'|' \
-e 's|<theme>|'${THEME}'|' \
-e 's|<allow_pwd_on_files>|'${ALLOW_PWD_ON_FILES}'|' \
-e 's|<policy_when_full>|'${POLICY_WHEN_FULL}'|' lufi.conf
)" > lufi.conf
if [ -e /themes ]; then
for theme in $(ls /themes); do
ln -s /themes/$theme themes/$theme
done
fi
/tini -s -- /usr/local/bin/carton exec hypnotoad -f /usr/lufi/script/lufi