Use official python as base and add tini

This commit is contained in:
Felipe Santos
2022-11-18 14:49:37 -03:00
parent b09bbd79c4
commit 15d9d4ebf4
5 changed files with 39 additions and 52 deletions
Executable
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
# ==============================================================================
# Runs go2rtc
# ==============================================================================
echo 'Starting go2rtc...' >&2
readonly config_path="/config"
if [[ -x "${config_path}/go2rtc" ]]; then
readonly binary_path="${config_path}/go2rtc"
echo "Using go2rtc binary from '${binary_path}' instead of the embedded one" >&2
else
readonly binary_path="/usr/local/bin/go2rtc"
fi
# set cwd for go2rtc (for config file, Hass integration, etc)
cd "${config_path}" || echo "Could not change working directory to '${config_path}'" >&2
exec "${binary_path}"