Actualiser cookcli/rootfs/etc/services.d/cookcli/run
This commit is contained in:
parent
ce38001975
commit
81719df51e
|
|
@ -1,29 +1,14 @@
|
||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# --- Configuration ---
|
# L'environnement est déjà initialisé par cont-init.d
|
||||||
|
bashio::log.info "=== Démarrage du service CookCLI ==="
|
||||||
|
|
||||||
RECIPES_PATH=$(bashio::config 'recipes_path')
|
RECIPES_PATH=$(bashio::config 'recipes_path')
|
||||||
PORT=9081
|
PORT=9081
|
||||||
LOG_LEVEL=$(bashio::config 'log_level')
|
LOG_LEVEL=$(bashio::config 'log_level')
|
||||||
|
|
||||||
bashio::log.info "=== CookCLI Server ==="
|
exec /usr/local/bin/cook server "${RECIPES_PATH}" \
|
||||||
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}"
|
|
||||||
|
|
||||||
# Synchronisation Git initiale (si configurée)
|
|
||||||
if [ -n "$(bashio::config 'git_repository')" ]; then
|
|
||||||
bashio::log.info "Synchronisation Git initiale..."
|
|
||||||
# Implémentez votre logique de sync ici
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Lancement du serveur CookCLI sur toutes les interfaces
|
|
||||||
bashio::log.info "Démarrage du serveur CookCLI..."
|
|
||||||
exec cook server "${RECIPES_PATH}" \
|
|
||||||
--port "${PORT}" \
|
--port "${PORT}" \
|
||||||
--host "0.0.0.0" \
|
--host "0.0.0.0" \
|
||||||
# --log-level "${LOG_LEVEL}" \
|
|
||||||
>> /proc/1/fd/1 2>&1
|
>> /proc/1/fd/1 2>&1
|
||||||
Loading…
Reference in a new issue