Browse Source

new: zabbix

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@7440 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 9 years ago
parent
commit
9ee0df4a8f

+ 63 - 0
z/zabbix/zabbix-2.0.4-config.patch

@@ -0,0 +1,63 @@
+diff -uNr zabbix-2.0.4.orig/conf/zabbix_agentd.conf zabbix-2.0.4/conf/zabbix_agentd.conf
+--- zabbix-2.0.4.orig/conf/zabbix_agentd.conf	2012-12-08 20:09:14.000000000 +0900
++++ zabbix-2.0.4/conf/zabbix_agentd.conf	2013-02-06 23:06:31.629877244 +0900
+@@ -10,6 +10,8 @@
+ # Default:
+ # PidFile=/tmp/zabbix_agentd.pid
+ 
++PidFile=/var/run/zabbix/zabbix_agentd.pid
++
+ ### Option: LogFile
+ #	Name of log file.
+ #	If not set, syslog is used.
+@@ -18,7 +20,7 @@
+ # Default:
+ # LogFile=
+ 
+-LogFile=/tmp/zabbix_agentd.log
++LogFile=/var/log/zabbix/zabbix_agentd.log
+ 
+ ### Option: LogFileSize
+ #	Maximum size of log file in MB.
+diff -uNr zabbix-2.0.4.orig/conf/zabbix_proxy.conf zabbix-2.0.4/conf/zabbix_proxy.conf
+--- zabbix-2.0.4.orig/conf/zabbix_proxy.conf	2012-12-08 20:09:14.000000000 +0900
++++ zabbix-2.0.4/conf/zabbix_proxy.conf	2013-02-06 23:07:55.307075875 +0900
+@@ -74,7 +74,7 @@
+ # Default:
+ # LogFile=
+ 
+-LogFile=/tmp/zabbix_proxy.log
++LogFile=/var/log/zabbix/zabbix_proxy.log
+ 
+ ### Option: LogFileSize
+ #	Maximum size of log file in MB.
+@@ -105,6 +105,8 @@
+ # Default:
+ # PidFile=/tmp/zabbix_proxy.pid
+ 
++PidFile=/var/run/zabbix/zabbix_proxy.pid
++
+ ### Option: DBHost
+ #	Database host name.
+ #	If set to localhost, socket is used for MySQL.
+diff -uNr zabbix-2.0.4.orig/conf/zabbix_server.conf zabbix-2.0.4/conf/zabbix_server.conf
+--- zabbix-2.0.4.orig/conf/zabbix_server.conf	2012-12-08 20:09:14.000000000 +0900
++++ zabbix-2.0.4/conf/zabbix_server.conf	2013-02-06 23:07:13.099975936 +0900
+@@ -36,7 +36,7 @@
+ # Default:
+ # LogFile=
+ 
+-LogFile=/tmp/zabbix_server.log
++LogFile=/var/log/zabbix/zabbix_server.log
+ 
+ ### Option: LogFileSize
+ #	Maximum size of log file in MB.
+@@ -67,6 +67,8 @@
+ # Default:
+ # PidFile=/tmp/zabbix_server.pid
+ 
++PidFile=/var/run/zabbix/zabbix_server.pid
++
+ ### Option: DBHost
+ #	Database host name.
+ #	If set to localhost, socket is used for MySQL.

+ 21 - 0
z/zabbix/zabbix-2.0.4-font.patch

@@ -0,0 +1,21 @@
+diff -uNr zabbix-2.0.4.orig/frontends/php/include/defines.inc.php zabbix-2.0.4/frontends/php/include/defines.inc.php
+--- zabbix-2.0.4.orig/frontends/php/include/defines.inc.php	2012-12-08 20:09:18.000000000 +0900
++++ zabbix-2.0.4/frontends/php/include/defines.inc.php	2013-02-06 21:24:05.967666961 +0900
+@@ -35,7 +35,7 @@
+ define('ZBX_WIDGET_ROWS', 20);
+ 
+ define('ZBX_FONTPATH',				realpath('fonts')); // where to search for font (GD > 2.0.18)
+-define('ZBX_GRAPH_FONT_NAME',		'DejaVuSans'); // font file name
++define('ZBX_GRAPH_FONT_NAME',		'VL-Gothic-Regular'); // font file name
+ define('ZBX_GRAPH_LEGEND_HEIGHT',	120); // when graph height is less then this value, some legend will not show up
+ 
+ define('ZBX_SCRIPT_TIMEOUT',		60); // in seconds
+@@ -83,7 +83,7 @@
+ define('EVENTS_OPTION_ALL',		2);
+ define('EVENTS_OPTION_NOT_ACK', 3);
+ 
+-define('ZBX_FONT_NAME', 'DejaVuSans');
++define('ZBX_FONT_NAME', 'VL-Gothic-Regular');
+ 
+ define('ZBX_AUTH_INTERNAL',	0);
+ define('ZBX_AUTH_LDAP',		1);

+ 60 - 0
z/zabbix/zabbix-2.0.4-vine_path.patch

@@ -0,0 +1,60 @@
+diff -uNr zabbix-2.0.4.orig/database/ibm_db2/data.sql zabbix-2.0.4/database/ibm_db2/data.sql
+--- zabbix-2.0.4.orig/database/ibm_db2/data.sql	2012-12-08 20:11:15.000000000 +0900
++++ zabbix-2.0.4/database/ibm_db2/data.sql	2013-02-06 20:56:23.270120472 +0900
+@@ -822,7 +822,7 @@
+ INSERT INTO users_groups (id,usrgrpid,userid) values ('4','7','1');
+ INSERT INTO users_groups (id,usrgrpid,userid) values ('2','8','2');
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('1','Ping','/bin/ping -c 3 {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+-INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/usr/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
++INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('3','Detect operating system','sudo /usr/bin/nmap -O {HOST.CONN} 2>&1','2','7',NULL,'','','0','1');
+ INSERT INTO actions (actionid,name,eventsource,evaltype,status,esc_period,def_shortdata,def_longdata,recovery_msg,r_shortdata,r_longdata) values ('2','Auto discovery. Linux servers.','1','0','1','0','','','0','','');
+ INSERT INTO actions (actionid,name,eventsource,evaltype,status,esc_period,def_shortdata,def_longdata,recovery_msg,r_shortdata,r_longdata) values ('3','Report problems to Zabbix administrators','0','0','1','3600','{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}
+diff -uNr zabbix-2.0.4.orig/database/mysql/data.sql zabbix-2.0.4/database/mysql/data.sql
+--- zabbix-2.0.4.orig/database/mysql/data.sql	2012-12-08 20:11:15.000000000 +0900
++++ zabbix-2.0.4/database/mysql/data.sql	2013-02-06 20:58:56.554492484 +0900
+@@ -801,7 +801,7 @@
+ INSERT INTO `users_groups` (`id`,`usrgrpid`,`userid`) values ('4','7','1');
+ INSERT INTO `users_groups` (`id`,`usrgrpid`,`userid`) values ('2','8','2');
+ INSERT INTO `scripts` (`scriptid`,`name`,`command`,`host_access`,`usrgrpid`,`groupid`,`description`,`confirmation`,`type`,`execute_on`) values ('1','Ping','/bin/ping -c 3 {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+-INSERT INTO `scripts` (`scriptid`,`name`,`command`,`host_access`,`usrgrpid`,`groupid`,`description`,`confirmation`,`type`,`execute_on`) values ('2','Traceroute','/usr/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
++INSERT INTO `scripts` (`scriptid`,`name`,`command`,`host_access`,`usrgrpid`,`groupid`,`description`,`confirmation`,`type`,`execute_on`) values ('2','Traceroute','/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+ INSERT INTO `scripts` (`scriptid`,`name`,`command`,`host_access`,`usrgrpid`,`groupid`,`description`,`confirmation`,`type`,`execute_on`) values ('3','Detect operating system','sudo /usr/bin/nmap -O {HOST.CONN} 2>&1','2','7',NULL,'','','0','1');
+ INSERT INTO `actions` (`actionid`,`name`,`eventsource`,`evaltype`,`status`,`esc_period`,`def_shortdata`,`def_longdata`,`recovery_msg`,`r_shortdata`,`r_longdata`) values ('2','Auto discovery. Linux servers.','1','0','1','0','','','0','','');
+ INSERT INTO `actions` (`actionid`,`name`,`eventsource`,`evaltype`,`status`,`esc_period`,`def_shortdata`,`def_longdata`,`recovery_msg`,`r_shortdata`,`r_longdata`) values ('3','Report problems to Zabbix administrators','0','0','1','3600','{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}','1','{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}');
+diff -uNr zabbix-2.0.4.orig/database/oracle/data.sql zabbix-2.0.4/database/oracle/data.sql
+--- zabbix-2.0.4.orig/database/oracle/data.sql	2012-12-08 20:11:15.000000000 +0900
++++ zabbix-2.0.4/database/oracle/data.sql	2013-02-06 20:58:14.780390039 +0900
+@@ -2405,7 +2405,7 @@
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('1','Ping','/bin/ping -c 3 {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1')
+ /
+ 
+-INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/usr/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1')
++INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1')
+ /
+ 
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('3','Detect operating system','sudo /usr/bin/nmap -O {HOST.CONN} 2>&1','2','7',NULL,'','','0','1')
+diff -uNr zabbix-2.0.4.orig/database/postgresql/data.sql zabbix-2.0.4/database/postgresql/data.sql
+--- zabbix-2.0.4.orig/database/postgresql/data.sql	2012-12-08 20:11:15.000000000 +0900
++++ zabbix-2.0.4/database/postgresql/data.sql	2013-02-06 20:57:49.166328216 +0900
+@@ -823,7 +823,7 @@
+ INSERT INTO users_groups (id,usrgrpid,userid) values ('4','7','1');
+ INSERT INTO users_groups (id,usrgrpid,userid) values ('2','8','2');
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('1','Ping','/bin/ping -c 3 {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+-INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/usr/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
++INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('3','Detect operating system','sudo /usr/bin/nmap -O {HOST.CONN} 2>&1','2','7',NULL,'','','0','1');
+ INSERT INTO actions (actionid,name,eventsource,evaltype,status,esc_period,def_shortdata,def_longdata,recovery_msg,r_shortdata,r_longdata) values ('2','Auto discovery. Linux servers.','1','0','1','0','','','0','','');
+ INSERT INTO actions (actionid,name,eventsource,evaltype,status,esc_period,def_shortdata,def_longdata,recovery_msg,r_shortdata,r_longdata) values ('3','Report problems to Zabbix administrators','0','0','1','3600','{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}
+diff -uNr zabbix-2.0.4.orig/database/sqlite3/data.sql zabbix-2.0.4/database/sqlite3/data.sql
+--- zabbix-2.0.4.orig/database/sqlite3/data.sql	2012-12-08 20:11:15.000000000 +0900
++++ zabbix-2.0.4/database/sqlite3/data.sql	2013-02-06 20:57:32.060287129 +0900
+@@ -823,7 +823,7 @@
+ INSERT INTO users_groups (id,usrgrpid,userid) values ('4','7','1');
+ INSERT INTO users_groups (id,usrgrpid,userid) values ('2','8','2');
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('1','Ping','/bin/ping -c 3 {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+-INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/usr/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
++INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('2','Traceroute','/bin/traceroute {HOST.CONN} 2>&1','2',NULL,NULL,'','','0','1');
+ INSERT INTO scripts (scriptid,name,command,host_access,usrgrpid,groupid,description,confirmation,type,execute_on) values ('3','Detect operating system','sudo /usr/bin/nmap -O {HOST.CONN} 2>&1','2','7',NULL,'','','0','1');
+ INSERT INTO actions (actionid,name,eventsource,evaltype,status,esc_period,def_shortdata,def_longdata,recovery_msg,r_shortdata,r_longdata) values ('2','Auto discovery. Linux servers.','1','0','1','0','','','0','','');
+ INSERT INTO actions (actionid,name,eventsource,evaltype,status,esc_period,def_shortdata,def_longdata,recovery_msg,r_shortdata,r_longdata) values ('3','Report problems to Zabbix administrators','0','0','1','3600','{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}

+ 234 - 0
z/zabbix/zabbix-vl.spec

@@ -0,0 +1,234 @@
+%define ver 2.0.4
+%define rel 1
+
+Summary: The Enterprise-class Monitoring Solution for Everyone
+Name: zabbix
+Version: %{ver}
+Release: %{rel}%{?_dist_release}
+License: GPLv2
+Group: Applications/Services
+URL: https://www.zabbix.com/
+Source0: %{name}-%{version}.tar.gz
+Source1: zabbix_server.init
+Source2: zabbix_proxy.init
+Source3: zabbix_agentd.init
+Source4: zabbix_server.logrotate
+Source5: zabbix_proxy.logrotate
+Source6: zabbix_agentd.logrotate
+Patch0: zabbix-2.0.4-vine_path.patch
+Patch1: zabbix-2.0.4-font.patch
+Patch2: zabbix-2.0.4-config.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildRequires: postgresql-devel
+BuildRequires: curl-devel
+BuildRequires: net-snmp-devel
+BuildRequires: OpenIPMI-devel
+BuildRequires: iksemel-devel
+BuildRequires: unixODBC-devel
+BuildRequires: libssh2-devel
+Requires(pre): glibc-common
+Requires(pre): shadow-utils
+
+Vendor: Project Vine
+Distribution: Vine Linux
+Packager: iwaim
+
+%description
+The Enterprise-class Monitoring Solution for Everyone.
+
+%package server
+Summary: Zabbix Server
+Requires: %{name} == %{version}-%{release}
+Requires(post,preun): chkconfig
+Requires(preun,postun): initscripts
+
+%description server
+Zabbix Server
+
+%package agent
+Summary: Zabbix Agent
+Requires: %{name} == %{version}-%{release}
+Requires(post,preun): chkconfig
+Requires(preun,postun): initscripts
+
+%description agent
+Zabbix Agent
+
+%package proxy
+Summary: Zabbix Proxy
+Requires: %{name} == %{version}-%{release}
+Requires(post,preun): chkconfig
+Requires(preun,postun): initscripts
+
+%description proxy
+Zabbix Proxy
+
+%package frontend-php
+Summary: Zabbix web frontend with PHP
+Group: Applications/Internet
+Requires: php5
+Requires: php5-pgsql
+Requires: TrueType-vlgothic
+
+%description frontend-php
+Zabbix web frontend with PHP.
+
+%prep
+%setup -q
+%patch0 -p 1
+%patch1 -p 1
+%patch2 -p 1
+
+%build
+%configure --enable-server --enable-proxy --enable-agent --enable-ipv6 \
+           --sysconfdir=%{_sysconfdir}/zabbix \
+           --with-postgresql \
+           --with-libcurl \
+           --with-openipmi \
+           --with-net-snmp \
+           --with-jabber \
+           --with-unixodbc \
+           --with-ssh2
+
+%__make
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# make directories
+%__mkdir_p $RPM_BUILD_ROOT%{_localstatedir}/{log,run}/%{name}
+
+# DB
+%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix
+%__cp -a database/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix/
+
+# init.d
+%__mkdir_p $RPM_BUILD_ROOT%{_initddir}
+%__cp %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/zabbix_server
+%__cp %{SOURCE2} $RPM_BUILD_ROOT%{_initddir}/zabbix_proxy
+%__cp %{SOURCE3} $RPM_BUILD_ROOT%{_initddir}/zabbix_agentd
+
+# logrotate
+%__mkdir_p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+%__cp %{SOURCE4}  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_server
+%__cp %{SOURCE5}  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_proxy
+%__cp %{SOURCE6}  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_agentd
+
+## sub package
+# proxy
+%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy
+ln -s %{_datadir}/zabbix/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy/
+
+# frontend-php
+%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend
+%__cp -a frontends/php $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/
+%__rm -f $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/php/fonts/DejaVuSans.ttf
+
+ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf \
+      $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/php/fonts/
+
+%clean
+%__rm -rf $RPM_BUILD_ROOT
+
+%pre
+getent group zabbix >/dev/null || groupadd -r zabbix
+getent passwd zabbix >/dev/null || \
+useradd -r -g zabbix -d %{_sysconfdir}/zabbix -s /sbin/nologin \
+-c "Zabbix Monitoring Solution" zabbix
+exit 0
+
+%post server
+/sbin/chkconfig --add zabbix_server
+
+%post proxy
+/sbin/chkconfig --add zabbix_proxy
+
+%post agent
+/sbin/chkconfig --add zabbix_agentd
+
+%preun server
+if [ "$1" -eq 0 ]; then
+        /sbin/service zabbix_server stop >/dev/null 2>&1
+        /sbin/chkconfig --del zabbix_server
+fi
+
+%preun proxy
+if [ "$1" -eq 0 ]; then
+        /sbin/service zabbix_proxy stop >/dev/null 2>&1
+        /sbin/chkconfig --del zabbix_proxy
+fi
+
+%preun agent
+if [ "$1" -eq 0 ]; then
+        /sbin/service zabbix_agentd stop >/dev/null 2>&1
+        /sbin/chkconfig --del zabbix_agentd
+fi
+
+%postun server
+if [ "$1" -ge "1" ]; then
+        /sbin/service zabbix_server condrestart >/dev/null 2>&1 || :
+fi
+
+%postun proxy
+if [ "$1" -ge "1" ]; then
+        /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || :
+fi
+
+%postun agent
+if [ "$1" -ge "1" ]; then
+        /sbin/service zabbix_agentd condrestart >/dev/null 2>&1 || :
+fi
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING ChangeLog NEWS README
+%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name}
+%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name}
+%dir %{_datadir}/zabbix
+%{_datadir}/zabbix/postgresql
+
+%files server
+%defattr(-,root,root,-)
+%dir %{_sysconfdir}/zabbix
+%config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_server
+%{_sbindir}/zabbix_server
+%{_initddir}/zabbix_server*
+%{_mandir}/man8/zabbix_server.8*
+
+%files agent
+%defattr(-,root,root,-)
+%dir %{_sysconfdir}/zabbix
+%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent.conf
+%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_agentd
+%{_bindir}/zabbix_get
+%{_bindir}/zabbix_sender
+%{_sbindir}/zabbix_agent
+%{_sbindir}/zabbix_agentd
+%{_initddir}/zabbix_agentd
+%{_mandir}/man1/zabbix_get.1*
+%{_mandir}/man1/zabbix_sender.1*
+%{_mandir}/man8/zabbix_agentd.8*
+
+%files proxy
+%defattr(-,root,root,-)
+%dir %{_sysconfdir}/zabbix
+%config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_proxy
+%{_sbindir}/zabbix_proxy
+%{_initddir}/zabbix_proxy
+%{_mandir}/man8/zabbix_proxy.8*
+%dir %{_datadir}/zabbix-proxy
+%{_datadir}/zabbix-proxy/postgresql
+
+%files frontend-php
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING ChangeLog NEWS README
+%dir %{_datadir}/zabbix-frontend
+%{_datadir}/zabbix-frontend/php
+
+%changelog
+* Thu Feb  7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1
+- initial build for Vine Linux

+ 74 - 0
z/zabbix/zabbix_agentd.init

@@ -0,0 +1,74 @@
+#!/bin/bash
+#
+#       /etc/rc.d/init.d/zabbix_agentd
+#
+# Starts the zabbix_agentd daemon
+#
+# chkconfig: - 95 5
+# description: Zabbix Monitoring Agent
+# processname: zabbix_agentd
+# pidfile: /var/run/zabbix/zabbix_agentd.pid
+
+# Modified for Zabbix 2.0.0
+# May 2012, Zabbix SIA
+# 2012-02-07: IWAI, Masaharu; modified for Vine Linux
+
+# Source function library.
+
+. /etc/init.d/functions
+
+RETVAL=0
+prog="Zabbix Agent"
+ZABBIX_BIN="/usr/sbin/zabbix_agentd"
+
+if [ ! -x ${ZABBIX_BIN} ] ; then
+        echo -n "${ZABBIX_BIN} not installed! "
+        # Tell the user this has skipped
+        exit 5
+fi
+
+start() {
+        echo -n $"Starting $prog: "
+        daemon $ZABBIX_BIN
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix_agentd
+        echo
+}
+
+stop() {
+        echo -n $"Stopping $prog: "
+        killproc $ZABBIX_BIN
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix_agentd
+        echo
+}
+
+case "$1" in
+  start)
+        start
+        ;;
+  stop)
+        stop
+        ;;
+  reload|restart)
+        stop
+        sleep 10
+        start
+        RETVAL=$?
+        ;;
+  condrestart)
+        if [ -f /var/lock/subsys/zabbix_agentd ]; then
+            stop
+            start
+        fi
+        ;;
+  status)
+        status $ZABBIX_BIN
+        RETVAL=$?
+        ;;
+  *)
+        echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
+        exit 1
+esac
+
+exit $RETVAL

+ 7 - 0
z/zabbix/zabbix_agentd.logrotate

@@ -0,0 +1,7 @@
+/var/log/zabbix/zabbix_agentd.log {
+	missingok
+	monthly
+	notifempty
+	compress
+	create 0664 zabbix zabbix
+}

+ 74 - 0
z/zabbix/zabbix_proxy.init

@@ -0,0 +1,74 @@
+#!/bin/bash
+#
+#       /etc/rc.d/init.d/zabbix_proxy
+#
+# Starts the zabbix_proxy daemon
+#
+# chkconfig: - 96 4
+# description: Zabbix Proxy Server
+# processname: zabbix_proxy
+# pidfile: /var/run/zabbix/zabbix_proxy.pid
+
+# Modified for Zabbix 2.0.0
+# May 2012, Zabbix SIA
+# 2013-02-07: IWAI, Masaharu; based zabbix_server script
+
+# Source function library.
+
+. /etc/init.d/functions
+
+RETVAL=0
+prog="Zabbix Proxy"
+ZABBIX_BIN="/usr/sbin/zabbix_proxy"
+
+if [ ! -x ${ZABBIX_BIN} ] ; then
+        echo -n "${ZABBIX_BIN} not installed! "
+        # Tell the user this has skipped
+        exit 5
+fi
+
+start() {
+        echo -n $"Starting $prog: "
+        daemon $ZABBIX_BIN
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix_proxy
+        echo
+}
+
+stop() {
+        echo -n $"Stopping $prog: "
+        killproc $ZABBIX_BIN
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix_proxy
+        echo
+}
+
+case "$1" in
+  start)
+        start
+        ;;
+  stop)
+        stop
+        ;;
+  reload|restart)
+        stop
+        sleep 10
+        start
+        RETVAL=$?
+        ;;
+  condrestart)
+        if [ -f /var/lock/subsys/zabbix_proxy ]; then
+            stop
+            start
+        fi
+        ;;
+  status)
+        status $ZABBIX_BIN
+        RETVAL=$?
+        ;;
+  *)
+        echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
+        exit 1
+esac
+
+exit $RETVAL

+ 7 - 0
z/zabbix/zabbix_proxy.logrotate

@@ -0,0 +1,7 @@
+/var/log/zabbix/zabbix_proxy.log {
+	missingok
+	monthly
+	notifempty
+	compress
+	create 0664 zabbix zabbix
+}

+ 74 - 0
z/zabbix/zabbix_server.init

@@ -0,0 +1,74 @@
+#!/bin/bash
+#
+#       /etc/rc.d/init.d/zabbix_server
+#
+# Starts the zabbix_server daemon
+#
+# chkconfig: - 95 5
+# description: Zabbix Monitoring Server
+# processname: zabbix_server
+# pidfile: /var/run/zabbix/zabbix_server.pid
+
+# Modified for Zabbix 2.0.0
+# May 2012, Zabbix SIA
+# 2012-02-07: IWAI, Masaharu; modified for Vine Linux
+
+# Source function library.
+
+. /etc/init.d/functions
+
+RETVAL=0
+prog="Zabbix Server"
+ZABBIX_BIN="/usr/sbin/zabbix_server"
+
+if [ ! -x ${ZABBIX_BIN} ] ; then
+        echo -n "${ZABBIX_BIN} not installed! "
+        # Tell the user this has skipped
+        exit 5
+fi
+
+start() {
+        echo -n $"Starting $prog: "
+        daemon $ZABBIX_BIN
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix_server
+        echo
+}
+
+stop() {
+        echo -n $"Stopping $prog: "
+        killproc $ZABBIX_BIN
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix_server
+        echo
+}
+
+case "$1" in
+  start)
+        start
+        ;;
+  stop)
+        stop
+        ;;
+  reload|restart)
+        stop
+        sleep 10
+        start
+        RETVAL=$?
+        ;;
+  condrestart)
+        if [ -f /var/lock/subsys/zabbix_server ]; then
+            stop
+            start
+        fi
+        ;;
+  status)
+        status $ZABBIX_BIN
+        RETVAL=$?
+        ;;
+  *)
+        echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
+        exit 1
+esac
+
+exit $RETVAL

+ 7 - 0
z/zabbix/zabbix_server.logrotate

@@ -0,0 +1,7 @@
+/var/log/zabbix/zabbix_server.log {
+	missingok
+	monthly
+	notifempty
+	compress
+	create 0664 zabbix zabbix
+}