Compare commits

..

2 Commits

Author SHA1 Message Date
scriptos
04b741b28b Doku. 2025-10-27 22:00:40 +01:00
scriptos
189bd41ea1 Funktion "detect_compose_cmd" nachträglich committed. 2025-10-27 20:33:38 +01:00
2 changed files with 12 additions and 8 deletions

View File

@@ -1,8 +1,4 @@
# template_repository Dokumentation wird bei Gelegenheit nachgereicht.
Wichtig: Link für Lizenz anpassen.

View File

@@ -5,9 +5,9 @@
# Synapse: https://git.techniverse.net/scriptos/livekit-ip-watch.git # Synapse: https://git.techniverse.net/scriptos/livekit-ip-watch.git
# Autor: Patrick Asmus # Autor: Patrick Asmus
# Web: https://www.cleveradmin.de # Web: https://www.cleveradmin.de
# Version: 1.2 # Version: 1.2.1
# Datum: 27.10.2025 # Datum: 27.10.2025
# Modifikation: Funktionen "update_yaml_with_yq" und "update_yaml_fallback" überarbeitet # Modifikation: Funktion "detect_compose_cmd" nachträglich committed.
##################################################### #####################################################
set -euo pipefail set -euo pipefail
@@ -209,6 +209,14 @@ update_yaml_fallback() {
mv "$tmp" "$CONFIG_FILE" mv "$tmp" "$CONFIG_FILE"
} }
detect_compose_cmd() {
if command -v docker-compose >/dev/null 2>&1; then
echo "docker-compose"
else
echo "docker compose"
fi
}
restart_service() { restart_service() {
if [[ "$RUNTIME" == "compose" ]]; then if [[ "$RUNTIME" == "compose" ]]; then
local dir file local dir file
@@ -305,4 +313,4 @@ main() {
fi fi
} }
main "$@" main "$@"