mirror of
https://github.com/GothenburgBitFactory/taskchampion-sync-server.git
synced 2025-06-26 10:54:29 +02: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:
parent
55892d3b2d
commit
ecdfb6bdfd
1 changed files with 3 additions and 3 deletions
|
@ -3,9 +3,9 @@ set -e
|
|||
echo "starting entrypoint script..."
|
||||
if [ "$1" = "/bin/taskchampion-sync-server" ]; then
|
||||
echo "setting data directories"
|
||||
mkdir -p "/var/lib/taskchampion-sync-server/data"
|
||||
chown -R 1092:1092 "/var/lib/taskchampion-sync-server/data"
|
||||
chmod -R 700 "/var/lib/taskchampion-sync-server/data"
|
||||
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 "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue