Compare commits

...

3 Commits

Author SHA1 Message Date
Lukas f. Paluch
10d7a8d4ce
Merge f27a3c5206fead40d77aebac4424397b58be7f94 into 57ebd2acb8d8648a7cd931dbfacc7f1cf5999291 2025-12-06 14:44:40 -05:00
Lukas Paluch
f27a3c5206
fix rootless entrypoint - clarify and append jsonrpc
- rework statemant to be more clear
    - append check of json-rpc mode to rootless part
2024-02-27 08:54:33 +01:00
Lukas f. Paluch
1be5684ae3
enable rootless start
fixes bbernhard/signal-cli-rest-api#490
2024-02-23 15:10:57 +01:00

View File

@ -3,8 +3,27 @@
set -x
set -e
[ -d /etc/docker ] && echo "$FILE is a directory."
[ -z "${SIGNAL_CLI_CONFIG_DIR}" ] && echo "SIGNAL_CLI_CONFIG_DIR environmental variable needs to be set! Aborting!" && exit 1;
if [ "$(id -u)" -eq "${SIGNAL_CLI_UID}" ] && [ "$(id -g)" -eq "${SIGNAL_CLI_GID}" ]]
then
echo "UID and GID are already correct. Trying to start Signal Api"
# TODO: check mode
if [ "$MODE" = "json-rpc" ]
then
/usr/bin/jsonrpc2-helper
if [ -n "$JAVA_OPTS" ] ; then
echo "export JAVA_OPTS='$JAVA_OPTS'" >> /etc/default/supervisor
fi
service supervisor start
supervisorctl start all
fi
signal-cli-rest-api -signal-cli-config=${SIGNAL_CLI_CONFIG_DIR};
fi
usermod -u ${SIGNAL_CLI_UID} signal-api
groupmod -o -g ${SIGNAL_CLI_GID} signal-api