Skip to content

Commit 10d7e6c

Browse files
VR: remove apache2 config for removed VPC tiers (#7982)
1 parent 8aa45c1 commit 10d7e6c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

systemvm/debian/opt/cloud/bin/cs/CsAddress.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,12 @@ def post_config_change(self, method):
668668
logging.info("Not making dns publicly available")
669669

670670
if self.config.has_metadata():
671-
app = CsApache(self)
672-
app.setup()
671+
if method == "add":
672+
app = CsApache(self)
673+
app.setup()
674+
elif method == "delete":
675+
app = CsApache(self)
676+
app.remove()
673677

674678
# If redundant then this is dealt with
675679
# by the primary backup functions

systemvm/debian/opt/cloud/bin/cs/CsApp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CsApache(CsApp):
3434
""" Set up Apache """
3535

3636
def remove(self):
37-
file = "/etc/apache2/sites-enabled/vhost-%s.conf" % self.dev
37+
file = "/etc/apache2/sites-enabled/vhost-%s.conf" % self.ip
3838
if os.path.isfile(file):
3939
os.remove(file)
4040
CsHelper.service("apache2", "restart")

0 commit comments

Comments
 (0)