Debian package: move home dir to match other components #69

Merged
alexvanin merged 1 commit from DmitryZabolotsky/frostfs-http-gw:misc/move-home-dir into master 2023-08-31 11:26:20 +00:00

View file

@ -21,7 +21,7 @@ set -e
case "$1" in case "$1" in
configure) configure)
USERNAME=http USERNAME=http
id -u frostfs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /srv/frostfs_cache --system -M -U -c "FrostFS HTTP gateway" frostfs-$USERNAME id -u frostfs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /var/lib/frostfs/$USERNAME --system -M -U -c "FrostFS HTTP gateway" frostfs-$USERNAME
if ! dpkg-statoverride --list /etc/frostfs/$USERNAME >/dev/null; then if ! dpkg-statoverride --list /etc/frostfs/$USERNAME >/dev/null; then
chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME
chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yaml || true chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yaml || true
@ -29,7 +29,7 @@ case "$1" in
chmod -f 0640 /etc/frostfs/$USERNAME/config.yaml || true chmod -f 0640 /etc/frostfs/$USERNAME/config.yaml || true
fi fi
USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6) USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6)
if ! dpkg-statoverride --list frostfs-"$USERDIR" >/dev/null; then if ! dpkg-statoverride --list "$USERDIR" >/dev/null; then
dkirillov marked this conversation as resolved
Review

In other components we have frostfs-"$USERDIR"

if ! dpkg-statoverride --list frostfs-"$USERDIR" >/dev/null; then

In other components we have `frostfs-"$USERDIR"` https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/c750c87a618cd2b6f64d66fbb1b34673aee8ac8f/debian/frostfs-s3-gw.postinst#L32
Review

It's the correct variant.
Other packages should be changed to match.

It's the correct variant. Other packages should be changed to match.
chown -f frostfs-$USERNAME: "$USERDIR" chown -f frostfs-$USERNAME: "$USERDIR"
fi fi
;; ;;