taskchampion-sync-server/docker-entrypoint.sh
Dustin J. Mitchell 58231619a7
Use DATA_DIR and taskchampion username in entrypoint
In fact, there is no taskchampion group (1092 is not a defined gid).
Instead taskchampion is in the `users` group.
2025-03-03 21:46:27 +00:00

13 lines
377 B
Bash
Executable file

#!/bin/sh
set -e
echo "starting entrypoint script..."
if [ "$1" = "/bin/taskchampion-sync-server" ]; then
echo "setting data directories"
mkdir -p "${DATA_DIR}"
chown -R taskchampion:users "${DATA_DIR}"
chmod -R 700 "${DATA_DIR}"
if [ "$(id -u)" = "0" ]; then
echo "switching to user 'taskchampion'"
exec su-exec taskchampion "$@"
fi
fi