diff options
Diffstat (limited to 'scripts/os/freebsd/42-icinga')
-rw-r--r-- | scripts/os/freebsd/42-icinga | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/os/freebsd/42-icinga b/scripts/os/freebsd/42-icinga index 872c1c6..9ac2067 100644 --- a/scripts/os/freebsd/42-icinga +++ b/scripts/os/freebsd/42-icinga @@ -1,3 +1,19 @@ #!/bin/sh +if [ "$BOXCONF_HOSTCLASS" = icinga_server ]; then + return 0 +fi + pkg install -y monitoring-plugins + +add_user \ + -c 'Icinga pseudo-user' \ + -d "$icinga_home_dir" \ + -s /bin/sh \ + -u "$icinga_uid" \ + "$icinga_local_user" + +install_directory -m 0700 -o "$icinga_local_user" -g "$icinga_local_user" \ + "${icinga_home_dir}" \ + "${icinga_home_dir}/.ssh" +install_file -m 0600 -o "$icinga_local_user" -g "$icinga_local_user" "${icinga_home_dir}/.ssh/authorized_keys" |