-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnethserver-zabbix-agent-checks.spec
50 lines (42 loc) · 1.5 KB
/
nethserver-zabbix-agent-checks.spec
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Summary: Adds some checks for monitoring NethServer backups via zabbix-agent
Name: nethserver-zabbix-agent-checks
Version: 1.0.1
Release: 1.ns7
License: GPLv3
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-root
Source0: %{name}-%{version}.tar.gz
Source1: LICENSE
URL: https://github.com/syntaxerrormmm/zbx-nethbackup-check
Group: Applications/Internet
Requires: zabbix-agent
Requires: python
Requires: sudo
Requires(post): systemd
%description
Adds some checks for monitoring NethServer backups via zabbix-agent
%install
install -d %{buildroot}/%{_bindir}
install -d %{buildroot}/%{_sysconfdir}/zabbix/zabbix_agentd.d
install -m0755 -o root -g root $RPM_SOURCE_DIR/nsmbcheck.py %{buildroot}/%{_bindir}/nsmbcheck.py
install -m0644 -o root -g root $RPM_SOURCE_DIR/userparameter_nethserver.conf %{buildroot}/%{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_nethserver.conf
%files
%{_bindir}/nsmbcheck.py
%{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_nethserver.conf
%license LICENSE
%post
/usr/bin/systemctl restart zabbix-agent
%postun
#if [ "$1" = 1 ]; then
# #upgrade
#fi
if [ "$1" = 0 ]; then
rm -f %{_bindir}/nsmbcheck.py
rm -f %{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_nethserver.conf
/usr/bin/systemctl restart zabbix-agent
fi
%changelog
* Wed Jan 04 2023 Emiliano Vavassori <syntaxerrormmm@gmail.com> - 1.0.1-1.ns7
- Bugfix: script returned syntax error while checking backups.
* Wed Apr 08 2020 Emiliano Vavassori <syntaxerrormmm@gmail.com> - 1.0.0-1.ns7
- First release for NethServer 7