mirror of
https://github.com/sstent/containers.git
synced 2026-01-25 08:34:48 +00:00
28 lines
903 B
Bash
28 lines
903 B
Bash
#!/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 |