Skip to content

Instantly share code, notes, and snippets.

@zzamboni
Created February 23, 2012 14:43
Show Gist options
  • Save zzamboni/1893134 to your computer and use it in GitHub Desktop.
Save zzamboni/1893134 to your computer and use it in GitHub Desktop.
vars:
"allparams" slist => getindices("$(params)");
secondpass::
"sshdparamlist" slist => grep("[^_].*", "allparams");
"sshdparams[$(sshdparamlist)]" string => "$($(params)[$(sshdparamlist)])";
classes:
"use_restart_cmd" not => strcmp("$($(params)[_sshd_restart_cmd])", "");
"secondpass" expression => isvariable("allparams");
"thirdpass" expression => isvariable("sshdparamlist");
files:
thirdpass::
"$($(params)[_sshd_config_file])"
handle => "sshd_edit_configfile",
comment => "Set desired sshd_config parameters",
edit_line => set_config_values("sshd_set_cfg.sshdparams"),
classes => if_repaired("restart_sshd");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment