Skip to content

Commit e1ccbfb

Browse files
andrijapanicsbyadvr
authored andcommitted
debian: fix symlink issue post install/upgrade (#3695)
Clean up redundant/colliding decision
1 parent 24db4d8 commit e1ccbfb

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

debian/cloudstack-usage.postinst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,10 @@ set -e
2121

2222
case "$1" in
2323
configure)
24-
# We copy the db.properties file from the management server to the usage server
25-
# This used to be a symlink, but we don't do that anymore
26-
if [ -f "/etc/cloud/management/db.properties" ]; then
27-
cp -a /etc/cloud/management/db.properties /etc/cloudstack/usage/db.properties
28-
fi
29-
30-
# Replacing db.properties with management server db.properties
24+
25+
# Linking usage server db.properties to management server db.properties
3126
if [ -f "/etc/cloudstack/management/db.properties" ]; then
32-
rm -rf /etc/cloudstack/usage/db.properties
27+
rm -f /etc/cloudstack/usage/db.properties
3328
ln -s /etc/cloudstack/management/db.properties /etc/cloudstack/usage/db.properties
3429
fi
3530

@@ -40,7 +35,7 @@ case "$1" in
4035

4136
# Replacing key with management server key
4237
if [ -f "/etc/cloudstack/management/key" ]; then
43-
rm -rf /etc/cloudstack/usage/key
38+
rm -f /etc/cloudstack/usage/key
4439
ln -s /etc/cloudstack/management/key /etc/cloudstack/usage/key
4540
fi
4641
;;

0 commit comments

Comments
 (0)