Files
hassio-addons/baikal/rootfs/etc/cont-init.d/90-run.sh
Alexandre 561ef230a9 feat(baikal): update to Baikal 0.12.1 and track sabre-io releases (#3039)
* feat(baikal): update to Baikal 0.12.1 and track sabre-io releases

ckulka/baikal-docker, and the archived fork the addon was based on, stopped
publishing images at Baikal 0.10.1, so the addon could not follow upstream and
its updater tracked a repository that no longer moves.

The base image is now used for its runtime only (nginx, php-fpm, msmtp) and the
application comes from the release published by sabre-io, which the updater can
follow. The Home Assistant timezone fix the fork carried as a whole patched
Plugin.php is applied as the single hunk it actually is, and the build fails if
sabre/dav ever moves that code.

The addon data folder holds the application as well as the user data, and it was
seeded with no-clobber, so a rebuilt image never replaced the code being served.
Application folders are now refreshed on every start ; Specific and config are
still only seeded when missing.

Closes #3038

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(baikal): satisfy markdownlint on the new changelog and readme lines

Bare URLs (MD034) and a heading with no blank line before its list (MD022 /
MD032). The blank line matches the older hand-written entries in the same file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 09:48:26 +02:00

28 lines
846 B
Bash
Executable File

#!/bin/bash
set -e
# Baikal keeps its database in Specific and its configuration in config. The
# release ships both as empty folders, so they are created here rather than
# copied, and are then left alone : they hold the user's data
mkdir -p /data/config /data/Specific/db
# Everything else is application code, and is replaced on every start so that a
# rebuilt image actually replaces the code that is served
for item in /var/www/baikal/*; do
name="$(basename "$item")"
case "$name" in
Specific | config) continue ;;
esac
rm -rf "/data/$name"
cp -rf "$item" /data/
done
# Fix permissions
chown -R nginx:nginx /data
# Start app
# Find the PHP FPM service script and start it
find /etc/init.d -type f -name "php*-fpm" -exec {} start \; \
&& chown -R nginx:nginx /data/Specific \
&& nginx -g "daemon off;"