Skip to content

Commit c353588

Browse files
authored
Create user 'cloud' in cloudstack-usage postinstall (#7559)
This ensures the chown 'cloud:cloud' command (later in the same file) is always performed with no error.
1 parent 4138ca7 commit c353588

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

debian/cloudstack-usage.postinst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ set -e
2121

2222
case "$1" in
2323
configure)
24-
24+
if ! getent passwd cloud >/dev/null; then
25+
adduser --quiet --system --group --no-create-home --home /var/lib/cloudstack/management cloud
26+
else
27+
usermod -m -d /var/lib/cloudstack/management cloud || true
28+
fi
29+
2530
# Linking usage server db.properties to management server db.properties
2631
if [ -f "/etc/cloudstack/management/db.properties" ]; then
2732
echo "Replacing usage server's db.properties with a link to the management server's db.properties"

0 commit comments

Comments
 (0)