#!/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}'|' \ -e 's||'${CONTACT}'|' \ -e 's||'${MAX_FILE_SIZE}'|' \ -e 's||'${WEBROOT}'|' \ -e 's||'${DEFAULT_DELAY}'|' \ -e 's||'${MAX_DELAY}'|' \ -e 's||'${THEME}'|' \ -e 's||'${ALLOW_PWD_ON_FILES}'|' \ -e 's||'${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