~shaner/charm-helpers/lp1712203

Viewing all changes in revision 785.

  • Committer: shane.peters at canonical
  • Date: 2017-08-22 15:59:35 UTC
  • Revision ID: shane.peters@canonical.com-20170822155935-83preg5jyb412yok
[shaner,r=] Fixes parsing of currently loaded apache modules

When hardening apache, the returned list of currently
enabled modules is always empty.

This change splits on linefeeds from the output of
'apachectl -M' instead of spaces which allows the
regex to match.

Since the returned list of modules could potentitialy
be used as input to '_disable_module' the regex was tweaked
to truncate the module name, removing the '_module' since
this is what a2dismod expects.

Closes-Bug: #1712203

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: