Refactoring CI

This commit is contained in:
Alexey Khit
2022-12-17 23:15:30 +03:00
parent a6057a2eca
commit c1fac66329
3 changed files with 25 additions and 33 deletions
-22
View File
@@ -1,22 +0,0 @@
#!/bin/bash
# ==============================================================================
# Runs go2rtc
# ==============================================================================
set -euo pipefail
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}"