mirror of
https://github.com/qbittorrent/docker-qbittorrent-nox.git
synced 2024-11-23 09:19:47 +00:00
Update user ID and group ID only when necessary
This commit is contained in:
parent
0efd9c5813
commit
bee722307c
@ -4,11 +4,11 @@ downloadsPath="/downloads"
|
||||
profilePath="/config"
|
||||
qbtConfigFile="$profilePath/qBittorrent/config/qBittorrent.conf"
|
||||
|
||||
if [ -n "$PUID" ]; then
|
||||
if [ -n "$PUID" ] && [ "$PUID" != "$(id -u qbtUser)" ]; then
|
||||
sed -i "s|^qbtUser:x:[0-9]*:|qbtUser:x:$PUID:|g" /etc/passwd
|
||||
fi
|
||||
|
||||
if [ -n "$PGID" ]; then
|
||||
if [ -n "$PGID" ] && [ "$PGID" != "$(id -g qbtUser)" ]; then
|
||||
sed -i "s|^\(qbtUser:x:[0-9]*\):[0-9]*:|\1:$PGID:|g" /etc/passwd
|
||||
sed -i "s|^qbtUser:x:[0-9]*:|qbtUser:x:$PGID:|g" /etc/group
|
||||
fi
|
||||
|
@ -4,11 +4,11 @@ downloadsPath="/downloads"
|
||||
profilePath="/config"
|
||||
qbtConfigFile="$profilePath/qBittorrent/config/qBittorrent.conf"
|
||||
|
||||
if [ -n "$PUID" ]; then
|
||||
if [ -n "$PUID" ] && [ "$PUID" != "$(id -u qbtUser)" ]; then
|
||||
sed -i "s|^qbtUser:x:[0-9]*:|qbtUser:x:$PUID:|g" /etc/passwd
|
||||
fi
|
||||
|
||||
if [ -n "$PGID" ]; then
|
||||
if [ -n "$PGID" ] && [ "$PGID" != "$(id -g qbtUser)" ]; then
|
||||
sed -i "s|^\(qbtUser:x:[0-9]*\):[0-9]*:|\1:$PGID:|g" /etc/passwd
|
||||
sed -i "s|^qbtUser:x:[0-9]*:|qbtUser:x:$PGID:|g" /etc/group
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user