mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-09 17:15:57 +02:00
Remove karakeep binary assets
This commit is contained in:
15
karakeep/rootfs/etc/cont-init.d/90-folders.sh
Normal file
15
karakeep/rootfs/etc/cont-init.d/90-folders.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
bashio::log.info "Creating folders"
|
||||
|
||||
mkdir -p \
|
||||
/data/cache \
|
||||
/data/chrome \
|
||||
/share/karakeep/extensions \
|
||||
/config/meili
|
||||
|
||||
if id chrome &>/dev/null; then
|
||||
chown -R chrome:chrome /data/cache /data/chrome
|
||||
fi
|
||||
21
karakeep/rootfs/etc/s6-overlay/s6-rc.d/svc-chrome/run
Normal file
21
karakeep/rootfs/etc/s6-overlay/s6-rc.d/svc-chrome/run
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
EXTENSIONS_DIR="${CHROME_EXTENSIONS_DIR:-/share/karakeep/extensions}"
|
||||
|
||||
extensions=()
|
||||
for extension in "${EXTENSIONS_DIR}/i-dont-care-about-cookies" "${EXTENSIONS_DIR}/ublock-origin"; do
|
||||
if [ -d "$extension" ]; then
|
||||
extensions+=("$extension")
|
||||
fi
|
||||
done
|
||||
|
||||
extension_flag=""
|
||||
if [ ${#extensions[@]} -gt 0 ]; then
|
||||
extension_flag="--load-extension=$(IFS=,; echo "${extensions[*]}")"
|
||||
fi
|
||||
|
||||
cd /usr/src/chrome
|
||||
|
||||
exec su chrome -c "chromium-browser --headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --hide-scrollbars --disable-crash-reporter --no-crash-upload --user-data-dir=/data/chrome ${extension_flag}"
|
||||
1
karakeep/rootfs/etc/s6-overlay/s6-rc.d/svc-chrome/type
Normal file
1
karakeep/rootfs/etc/s6-overlay/s6-rc.d/svc-chrome/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
mkdir -p "${MEILI_DIR}"
|
||||
|
||||
exec /bin/meilisearch --db-path "${MEILI_DIR}" --no-analytics --experimental-dumpless-upgrade
|
||||
@@ -0,0 +1 @@
|
||||
longrun
|
||||
Reference in New Issue
Block a user