mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-15 09:58:57 -07:00
parent
a64ae36bcc
commit
9f8e6966d8
@ -14,8 +14,10 @@ if [ "$(id -u)" = '0' ]; then
|
||||
setcap "$PCAP" "$binary"
|
||||
fi
|
||||
|
||||
chown "${PUID}:${PGID}" "${HOME}" \
|
||||
&& exec su-exec "${PUID}:${PGID}" \
|
||||
# Chown may fail, which may cause us to be unable to start; but maybe
|
||||
# it'll work anyway, so we let the error slide.
|
||||
chown "${PUID}:${PGID}" "${HOME}" || true
|
||||
exec su-exec "${PUID}:${PGID}" \
|
||||
env HOME="$HOME" "$@"
|
||||
else
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user