mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
debian: Copy management server configuration from old location
Signed-off-by: Wido den Hollander <wido@42on.com>
This commit is contained in:
parent
35e5b8e3f8
commit
44a0facd38
16
debian/cloudstack-management.postinst
vendored
16
debian/cloudstack-management.postinst
vendored
@ -20,7 +20,7 @@ if [ "$1" = configure ]; then
|
||||
if ! getent passwd cloud >/dev/null; then
|
||||
adduser --quiet --system --group --no-create-home --home /var/lib/cloudstack/management cloud
|
||||
else
|
||||
usermod -m -d /var/lib/cloudstack/management cloud
|
||||
usermod -m -d /var/lib/cloudstack/management cloud || true
|
||||
fi
|
||||
|
||||
for i in /var/cache/cloudstack/management \
|
||||
@ -36,6 +36,20 @@ if [ "$1" = configure ]; then
|
||||
chgrp cloud $i
|
||||
done
|
||||
|
||||
OLDCONFDIR="/etc/cloud/management"
|
||||
NEWCONFDIR="/etc/cloudstack/management"
|
||||
CONFFILES="db.properties db-enc.properties cloud.keystore key"
|
||||
|
||||
# Copy old configuration so the admin doesn't have to do that
|
||||
# Only do so when we are installing for the first time
|
||||
if [ -z "$2" ]; then
|
||||
for FILE in $CONFFILES; do
|
||||
if [ -f "$OLDCONFDIR/${FILE}" ]; then
|
||||
cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
chmod 0640 /etc/cloudstack/management/db.properties
|
||||
chgrp cloud /etc/cloudstack/management/db.properties
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user