entrypoint: Start secretsocket server if needed
dustin/xactfetch/pipeline/head This commit looks good
Details
dustin/xactfetch/pipeline/head This commit looks good
Details
If the `SECRET_SOCKET_PATH` environment variable is not set, or refers to a non-existent path, then we assume we need to manage the `secretsocket` server ourselves.
parent
d7e4394c98
commit
c8111c6e48
|
@ -77,4 +77,4 @@ WORKDIR /var/lib/xactfetch
|
||||||
|
|
||||||
USER 2468:2468
|
USER 2468:2468
|
||||||
|
|
||||||
ENTRYPOINT ["tini", "/entrypoint.sh", "--"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
exec xvfb-run -e /dev/stderr -s '-screen 0 1920x1080x24 -nolisten unix' xactfetch "$@"
|
if [ $$ -eq 1 ]; then
|
||||||
|
exec tini "$0" -- "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${SECRET_SOCKET_PATH}" ] || [ ! -e "${SECRET_SOCKET_PATH}" ]; then
|
||||||
|
export SECRET_SOCKET_PATH="${SECRET_SOCKET_PATH:-/tmp/.secretsocket}"
|
||||||
|
secretsocket &
|
||||||
|
sspid=$!
|
||||||
|
fi
|
||||||
|
|
||||||
|
xvfb-run -e /dev/stderr -s '-screen 0 1920x1080x24 -nolisten unix' xactfetch "$@"
|
||||||
|
|
||||||
|
if [ -n "${sspid}" ]; then
|
||||||
|
kill $sspid
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue