mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1622 from YunoHost/fix-_port_is_used
trying to fix _port_is_used
This commit is contained in:
commit
9f211d39f9
1 changed files with 2 additions and 2 deletions
|
@ -916,8 +916,8 @@ class PortsResource(AppResource):
|
|||
% port
|
||||
)
|
||||
# This second command is mean to cover (most) case where an app is using a port yet ain't currently using it for some reason (typically service ain't up)
|
||||
cmd2 = f"grep --quiet \"port: '{port}'\" /etc/yunohost/apps/*/settings.yml"
|
||||
return os.system(cmd1) == 0 and os.system(cmd2) == 0
|
||||
cmd2 = f"grep --quiet --extended-regexp \"port: '?{port}'?\" /etc/yunohost/apps/*/settings.yml"
|
||||
return os.system(cmd1) == 0 or os.system(cmd2) == 0
|
||||
|
||||
def provision_or_update(self, context: Dict = {}):
|
||||
from yunohost.firewall import firewall_allow, firewall_disallow
|
||||
|
|
Loading…
Add table
Reference in a new issue