Comment 5 for bug 1782226

Revision history for this message
Thomas Ward (teward) wrote : Re: Allow NGINX to install but not start during postinst if another process is bound to port 80

sdeziel: Are we 100% certain that iproute2 is available on all releases of Ubuntu? I'm pretty sure `lsof` is in all the Ubuntu repos as well (in the Main pocket).

Further, while `ss` gets the information I need (with `ss -tunl 'sport = 80'), the detection code currently tests the lsof output to see if there's anything detected. If there isn't, then it attempts to start the NGINX service. If there is, then it assumes that Port 80 is in use. Even if -H worked in the latest versions, `-H` doesn't work (doesn't exist) for `ss` in older releases such as Xenial, so if we intend to eventually SRU this change into other releases so we can stop having a ton of "Not a bug" bugs filed against the NGINX package, it wouldn't work.

Whereas, the `lsof -i :80` command works and only outputs the listening sockets, and leaves an empty reply if there's no listening socket.

It's also nasty, it seems, to remove the header currently from `ss`, and since -H segfaults I'm not sure that's a viable option currently.