Fix direct function calls in lib scripts to prevent execution on source
This commit is contained in:
@@ -43,5 +43,9 @@ if ! command -v log_info &>/dev/null; then
|
||||
log_error() { echo "[ERROR] $1" >&2; }
|
||||
fi
|
||||
|
||||
# Hauptlogik
|
||||
install_portainer
|
||||
# Nur ausführen, wenn diese Datei direkt ausgeführt wird (nicht beim `source` in setup.sh).
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
# Hauptlogik
|
||||
install_portainer
|
||||
exit $?
|
||||
fi
|
||||
Reference in New Issue
Block a user