Skip to content

Instantly share code, notes, and snippets.

@raphink
Last active June 27, 2016 15:49
Show Gist options
  • Save raphink/30a4cc842ebe1522bd76a60a62015b7d to your computer and use it in GitHub Desktop.
Save raphink/30a4cc842ebe1522bd76a60a62015b7d to your computer and use it in GitHub Desktop.
augeas { 'cacti_perms':
incl => '/etc/httpd/conf.d/cacti.conf',
lens => 'Httpd.lns',
changes => [
'defnode req Directory[arg="/usr/share/cacti/"]/IfModule[arg="mod_authz_core.c"]/directive[.="Require"] "Require"',
'set $req/arg[1] "all"',
'set $req/arg[2] "granted"',
'defnode nomodauthzcore Directory[arg="/usr/share/cacti/"]/IfModule[arg="!mod_authz_core.c"] ""',
'set $nomodauthzcore/directive[.="Allow"]/arg[2] "all"',
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment