Ajouter cookcli/rootfs/etc/s6-overlay/s6-rc.d/cookcli/run
This commit is contained in:
parent
286228e719
commit
eb9ee0bf67
28
cookcli/rootfs/etc/s6-overlay/s6-rc.d/cookcli/run
Normal file
28
cookcli/rootfs/etc/s6-overlay/s6-rc.d/cookcli/run
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/with-contenv bashio
|
||||
set -e
|
||||
|
||||
# --- Configuration ---
|
||||
RECIPES_PATH=$(bashio::config 'recipes_path')
|
||||
PORT=$(bashio::config 'port')
|
||||
LOG_LEVEL=$(bashio::config 'log_level')
|
||||
|
||||
bashio::log.info "=== CookCLI Server ==="
|
||||
bashio::log.info "Dossier des recettes: ${RECIPES_PATH}"
|
||||
bashio::log.info "Port: ${PORT}"
|
||||
bashio::log.info "Niveau de log: ${LOG_LEVEL}"
|
||||
|
||||
# Création du dossier si inexistant
|
||||
mkdir -p "${RECIPES_PATH}"
|
||||
|
||||
# Attente que git-sync ait terminé (si configuré)
|
||||
if [ -n "$(bashio::config 'git_repository')" ]; then
|
||||
bashio::log.info "Attente de la synchronisation Git initiale..."
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# Lancement du serveur CookCLI
|
||||
bashio::log.info "Démarrage du serveur CookCLI..."
|
||||
exec cook server "${RECIPES_PATH}" \
|
||||
--port "${PORT}" \
|
||||
--log-level "${LOG_LEVEL}" \
|
||||
>> /proc/1/fd/1 2>&1
|
||||
Loading…
Reference in a new issue