Skip to content

Commit

Permalink
close port by default
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberCharitos committed May 30, 2024
1 parent 4448be8 commit df29069
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,10 @@ def update(self, event):
charm_function = self.config["charm-function"].value
logger.info("configuring ranger %s", charm_function)

self.model.unit.close_port(port=APPLICATION_PORT, protocol="tcp")

if charm_function == "usersync":
command, context = self._configure_ranger_usersync(container)
self.model.unit.close_port(port=APPLICATION_PORT, protocol="tcp")
elif charm_function == "admin":
self.model.unit.open_port(port=APPLICATION_PORT, protocol="tcp")
command, context = self._configure_ranger_admin(container)
Expand Down

0 comments on commit df29069

Please sign in to comment.