-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall_check.sh
executable file
·27 lines (25 loc) · 1.02 KB
/
install_check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
cp check_proxmox_backup.py check_proxmox_backup.py.bak
sed -i 's/debug = True/debug = False/g' check_proxmox_backup.py.bak
mkdir -p /usr/local/icinga/libexec/
mv check_proxmox_backup.py.bak /usr/local/icinga/libexec/check_proxmox_backup.py
cp pyproxmox.py /usr/local/icinga/libexec/
echo "Check installed"
echo " "
echo "If this is the first time you install the script and you are using a config file, execute now:"
echo "cp proxmox_api.conf /usr/local/icinga/libexec/"
echo " "
echo "and modify it accordingly:"
echo "vim /usr/local/icinga/libexec/proxmox_api.conf"
echo " "
echo "The define command on the watchbox should look like this:"
echo "/usr/local/icinga/etc/objects/general/commands_pve.cfg"
echo " "
echo " [...]"
echo "define command{"
echo " command_name check_ssh_pvebackups"
echo ' command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -C "sudo /usr/bin/python /usr/local/icinga/libexec/check_proxmox_backup.py -f /usr/local/icinga/libexec/proxmox_api.conf"'
echo "}"
echo " "
echo " "
echo " "