2024-04-28 00:08:51 +02:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
echoerr() { printf "%s\n" "$*" >&2; }
|
|
|
|
|
|
|
|
export SEMAPHORE_CONFIG_PATH="${SEMAPHORE_CONFIG_PATH:-/etc/semaphore}"
|
|
|
|
export SEMAPHORE_TMP_PATH="${SEMAPHORE_TMP_PATH:-/tmp/semaphore}"
|
|
|
|
|
2024-04-28 00:10:19 +02:00
|
|
|
if test -f "${SEMAPHORE_CONFIG_PATH}/requirements.txt"; then
|
2024-04-28 00:08:51 +02:00
|
|
|
echoerr "Installing additional python dependencies"
|
2024-06-05 10:28:32 +02:00
|
|
|
pip3 install --upgrade \
|
2024-04-28 00:10:19 +02:00
|
|
|
-r "${SEMAPHORE_CONFIG_PATH}/requirements.txt"
|
2024-04-28 00:08:51 +02:00
|
|
|
else
|
|
|
|
echoerr "No additional python dependencies to install"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echoerr "Starting semaphore runner"
|
|
|
|
if test "$#" -ne 1; then
|
2024-10-15 08:59:11 +02:00
|
|
|
exec /usr/local/bin/semaphore runner start --no-config
|
2024-04-28 00:08:51 +02:00
|
|
|
else
|
|
|
|
exec "$@"
|
|
|
|
fi
|