From 6e2a5993ce470341bed0e0c6ba8e44de3712d50e Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Sat, 26 Oct 2024 00:07:03 -0400 Subject: more icinga stuff --- scripts/os/freebsd/42-icinga | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'scripts/os') 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" -- cgit v1.2.3