Files
taskchampion-sync-server/docker-entrypoint.sh
Dustin J. Mitchell ecdfb6bdfd Use DATA_DIR and taskchampion username in entrypoint (#99)
In fact, there is no taskchampion group (1092 is not a defined gid).
Instead taskchampion is in the `users` group.
2025-03-03 16:53:53 -05:00

14 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