aboutsummaryrefslogtreecommitdiff
path: root/scripts/os/freebsd/42-icinga
blob: 9ac20672742c6e46d8927d607239b020f5183bb5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"