mirror of
https://github.com/GothenburgBitFactory/taskchampion-sync-server.git
synced 2026-04-05 17:20:35 +00:00
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.
This commit is contained in:
committed by
GitHub
parent
55892d3b2d
commit
ecdfb6bdfd
@ -3,9 +3,9 @@ set -e
|
|||||||
echo "starting entrypoint script..."
|
echo "starting entrypoint script..."
|
||||||
if [ "$1" = "/bin/taskchampion-sync-server" ]; then
|
if [ "$1" = "/bin/taskchampion-sync-server" ]; then
|
||||||
echo "setting data directories"
|
echo "setting data directories"
|
||||||
mkdir -p "/var/lib/taskchampion-sync-server/data"
|
mkdir -p "${DATA_DIR}"
|
||||||
chown -R 1092:1092 "/var/lib/taskchampion-sync-server/data"
|
chown -R taskchampion:users "${DATA_DIR}"
|
||||||
chmod -R 700 "/var/lib/taskchampion-sync-server/data"
|
chmod -R 700 "${DATA_DIR}"
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
echo "switching to user 'taskchampion'"
|
echo "switching to user 'taskchampion'"
|
||||||
exec su-exec taskchampion "$@"
|
exec su-exec taskchampion "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user