[#69] Fix postinstall script
All checks were successful
/ DCO (pull_request) Successful in 56s
/ Vulncheck (pull_request) Successful in 1m42s
/ Lint (pull_request) Successful in 2m42s
/ Tests (1.20) (pull_request) Successful in 1m45s
/ Tests (1.21) (pull_request) Successful in 1m28s
/ Builds (1.20) (pull_request) Successful in 1m49s
/ Builds (1.21) (pull_request) Successful in 5m49s

Post install script changes rights for user dir.
With change of user dir (home dir), this dir
isn't craeted anymore, so post install script
fails. This commit changes useradd flag `-m`  to
create user dir.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
Alexey Vanin 2023-09-01 14:19:26 +03:00
parent dbc6804d27
commit 834d5b93e5

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 /var/lib/frostfs/$USERNAME --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