Previously a module that was removed (not purged) and then reinstalled did not enable itself causing some confusion. Now, we maintain state by moving the module symlink to .removed on package removal. If the package is reinstalled the link is restored, if purged the link is completely dropped.
10 lines
304 B
Text
10 lines
304 B
Text
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
|
|
for confpair in #NAMES# ; do
|
|
from=$(echo $confpair | cut -d: -f1)
|
|
to=$(echo $confpair | cut -d: -f2)
|
|
|
|
if [ -L /etc/nginx/modules-enabled/$to ]; then
|
|
mv /etc/nginx/modules-enabled/$to /etc/nginx/modules-enabled/$to.removed
|
|
fi
|
|
done
|
|
fi
|