summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--services/applications/sshd.cf12
1 files changed, 4 insertions, 8 deletions
diff --git a/services/applications/sshd.cf b/services/applications/sshd.cf
index da602a1..1b5bca7 100644
--- a/services/applications/sshd.cf
+++ b/services/applications/sshd.cf
@@ -2,12 +2,6 @@ bundle agent sshd
{
files:
freebsd::
- "/etc/rc.conf"
- create => "true",
- edit_defaults => std_defs,
- perms => system_owned("444"),
- edit_line => append_if_no_line("sshd_enable=\"YES\""),
- classes => if_repaired("sshd_rc_conf_file_repaired");
"/root/.ssh/."
create => "true",
perms => system_owned("700"),
@@ -21,13 +15,15 @@ bundle agent sshd
classes:
freebsd::
"sshd_service_running" expression => returnszero("/usr/sbin/service sshd status", "noshell");
+ methods:
+ freebsd::
+ "any" usebundle => add_rc_conf_line("sshd_enable=\"YES\"");
commands:
freebsd.!sshd_service_running::
"/usr/sbin/service sshd start" classes => if_repaired("sshd_service_repaired");
reports:
any::
- "$(this.bundle): /etc/rc.conf repaired" ifvarclass => "sshd_rc_conf_file_repaired";
"$(this.bundle): /root/.ssh directory repaired" ifvarclass => "sshd_ssh_dir_repaired";
- "$(this.bundle): /root/.ssh/authorized_keys repaired" ifvarclass => "sshd_rc_conf_file_repaired";
+ "$(this.bundle): /root/.ssh/authorized_keys repaired" ifvarclass => "sshd_authorized_keys_files_repaired";
"$(this.bundle): sshd service repaired" ifvarclass => "sshd_service_repaired";
}