This commit is contained in:
tremor021 2025-06-10 18:46:09 +02:00
parent ca388a8320
commit 9bb41e2b79

View File

@ -49,7 +49,7 @@ EOF
sed -i -e 's/\$/\$\$/g' /opt/tinyauth/.env sed -i -e 's/\$/\$\$/g' /opt/tinyauth/.env
cat <<EOF >/etc/init.d/tinyauth cat <<'EOF' >/etc/init.d/tinyauth
#!/sbin/openrc-run #!/sbin/openrc-run
description="Tinyauth Service" description="Tinyauth Service"
@ -60,17 +60,17 @@ command_background="true"
pidfile="/var/run/tinyauth.pid" pidfile="/var/run/tinyauth.pid"
start_pre() { start_pre() {
if [ -f "/opt/tinyauth/.env" ]; then if [ -f "/opt/tinyauth/.env" ]; then
while IFS= read -r line || [ -n "${line:-}" ]; do while IFS= read -r line || [ -n "$line" ]; do
[ -z "${line:-}" ] && continue [ -z "$line" ] && continue
case "${line:-}" in case "$line" in
'#'*) '#'*)
continue continue
;; ;;
esac esac
export "$line" export "$line"
done < "/opt/tinyauth/.env" done < "/opt/tinyauth/.env"
fi fi
} }
depend() { depend() {