Commit graph

11 commits

Author SHA1 Message Date
Gioele Barabucci
d9b4c476c1 d/nginx-*.postinst: Use invoke-rc.d instead of pidof and ad-hoc tests
Checking if nginx is running using and a mixture of file tests and
`pidof` is fragile. Debian policy 9.3.3 states that `invoke-rc.d` should
be used instead to perform these checks.

In addition, the use of `pidof` creates an implicit depency on
`sysvinit-utils`. `sysvinit-utils` is currently essential, but that
may change in the future.

Patch originally contributed by @ah: https://paste.debian.net/1254794/
2022-09-25 22:03:56 +02:00
Ondřej Nový
cc65b80eb0 Check if port 80 is free before starting during install 2020-06-05 09:55:45 +02:00
Christos Trochalakis
12b7091e96 Switch module reloading logic to dpkg triggers
Fixes issues during upgrades from non dynamic nginx versions (jessie).

When multiple modules are installed together for the first time,
nginx reload might fail because, at that time, the configuration
might reference directives provided by module packages that are
not yet configured.

There are also other cases where the instant reload might break,
using triggers seems like the correct way to proceed.
2017-01-22 12:50:54 +02:00
Christos Trochalakis
1445c1403c *.postinst: Make sure we restart nginx if on-the-fly upgrade fails
Complements Mike's 1b3fa883.
2016-07-29 16:19:07 +03:00
Michael Lustfield
1b3fa883bb Make nginx-*.postinst use invoke-rc.d. 2016-07-16 19:14:08 -07:00
Christos Trochalakis
6aac19ae7a Fix #735551, nginx should be started by default
We don't handle the systemd case yet.
2014-01-17 13:45:56 +02:00
Christos Trochalakis
1e27766780 Fix systemd issue with package updates
If nginx was running, there was a high possibility that the
postrm hook would kill the nginx process without restarting or
upgrading it.
2013-10-17 16:35:37 +03:00
Michael Lustfield
de84132aee Moved the symlink creation of the default sites to nginx-common. Avoids the chance of it being recreated when installing different nginx versions. 2012-10-29 23:17:42 +00:00
Michael Lustfield
3fb2092faa Added extra checking to .postinst files. 2012-10-29 23:07:17 +00:00
Michael Lustfield
30c20ca283 Changed /var/run to /run in multiple files. 2012-10-12 02:16:03 +00:00
Cyril Lavier
04d69c73f4 Imported Debian patch 1.2.0-1 2012-05-08 07:55:38 +02:00