summaryrefslogtreecommitdiff
path: root/net-mgmt/zabbix74-server/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/zabbix74-server/files')
-rw-r--r--net-mgmt/zabbix74-server/files/patch-src_libs_zbxembed_duktape.h11
-rw-r--r--net-mgmt/zabbix74-server/files/pkg-message.in51
-rw-r--r--net-mgmt/zabbix74-server/files/zabbix_agentd.in67
-rw-r--r--net-mgmt/zabbix74-server/files/zabbix_java.in47
-rw-r--r--net-mgmt/zabbix74-server/files/zabbix_proxy.in71
-rw-r--r--net-mgmt/zabbix74-server/files/zabbix_server.in72
6 files changed, 319 insertions, 0 deletions
diff --git a/net-mgmt/zabbix74-server/files/patch-src_libs_zbxembed_duktape.h b/net-mgmt/zabbix74-server/files/patch-src_libs_zbxembed_duktape.h
new file mode 100644
index 000000000000..ff6595a49bb5
--- /dev/null
+++ b/net-mgmt/zabbix74-server/files/patch-src_libs_zbxembed_duktape.h
@@ -0,0 +1,11 @@
+--- src/libs/zbxembed/duktape.h.orig 2022-02-14 01:54:29.000000000 -0800
++++ src/libs/zbxembed/duktape.h 2022-02-15 13:48:15.058093000 -0800
+@@ -160,7 +160,7 @@
+ #if !defined(DUKTAPE_H_INCLUDED)
+ #define DUKTAPE_H_INCLUDED
+
+-#define DUK_SINGLE_FILE
++#undef DUK_SINGLE_FILE
+
+ /*
+ * BEGIN PUBLIC API
diff --git a/net-mgmt/zabbix74-server/files/pkg-message.in b/net-mgmt/zabbix74-server/files/pkg-message.in
new file mode 100644
index 000000000000..ebfdd4c41ae0
--- /dev/null
+++ b/net-mgmt/zabbix74-server/files/pkg-message.in
@@ -0,0 +1,51 @@
+[
+{ type: install
+ message: <<EOM
+This is a Zabbix Standard release!
+
+Standard Zabbix releases are supported for Zabbix customers during six (6)
+months of Full Support (general, critical and security issues) until the next
+Zabbix stable release, plus one (1) additional month of Limited Support
+(critical and security issues only). Zabbix Standard version release will result
+in change of the second version number.
+
+Standard release: Zabbix 7.4
+Release date: Jul 01, 2025
+End of Full Support: Until 8.0 LTS
+End of Limited Support: Q3 2026
+
+Zabbix Life Cycle & Release Policy:
+https://www.zabbix.com/life_cycle_and_release_policy
+
+Log files are now under /var/log/zabbix directory instead of /tmp as it was
+previously.
+
+For Zabbix server and proxy daemons, as well as Zabbix frontend, a database is
+required. It is not needed to run Zabbix agent.
+
+To populate the database with initial data:
+
+% cd %%DATADIR%%/%%ZABBIX_BUILD%%/database
+
+and follow the instructions:
+https://www.zabbix.com/documentation/7.4/en/manual/appendix/install/db_scripts
+
+Upgrade notes for 7.4:
+https://www.zabbix.com/documentation/7.4/en/manual/installation/upgrade_notes_740
+
+Upgrade procedure:
+https://www.zabbix.com/documentation/current/en/manual/installation/upgrade/sources
+
+Official Zabbix documentation:
+https://www.zabbix.com/documentation/7.4/en/manual
+
+Please see https://www.zabbix.com/ for detailed information about Zabbix.
+
+The default credentials for zabbix frontend is:
+ Username: Admin
+ Password: zabbix
+
+For use NMAP please edit sudoers.
+EOM
+}
+]
diff --git a/net-mgmt/zabbix74-server/files/zabbix_agentd.in b/net-mgmt/zabbix74-server/files/zabbix_agentd.in
new file mode 100644
index 000000000000..5fa104126dbe
--- /dev/null
+++ b/net-mgmt/zabbix74-server/files/zabbix_agentd.in
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+# PROVIDE: zabbix_agentd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
+# enable zabbix_agentd:
+#
+# zabbix_agentd_enable (bool): Set to NO by default. Set it to YES to
+# enable zabbix_agentd.
+# zabbix_agentd_config (string): Set to the standard config file path by
+# default.
+# zabbix_agentd_pidfile (string): Location of the zabbix_agent pid file
+# Default is /var/run/zabbix/zabbix_agentd.pid
+# zabbix_agentd_paths (string): Set to standard path by default. Set a search
+# if you have custom userparams that need binaries elsewhere.
+#
+
+. /etc/rc.subr
+
+name="zabbix_agentd"
+rcvar=zabbix_agentd_enable
+
+load_rc_config $name
+
+: ${zabbix_agentd_enable:=NO}
+: ${zabbix_agentd_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_agentd_pidfile:=/var/run/zabbix/zabbix_agentd.pid}
+: ${zabbix_agentd_paths:=$PATH}
+
+command="%%PREFIX%%/sbin/${name}"
+required_files="${zabbix_agentd_config}"
+
+start_cmd=zabbix_agentd_cmd
+start_precmd=zabbix_agentd_precmd
+status_precmd=zabbix_agentd_precmd
+stop_precmd=zabbix_agentd_precmd
+
+zabbix_agentd_precmd()
+{
+ pidfile=${zabbix_agentd_pidfile}
+ if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
+ pidfile="$_pidfile_from_conf"
+ fi
+ logfile=/var/log/zabbix/zabbix_agentd.log
+ if get_pidfile_from_conf LogFile ${zabbix_agentd_config}; then
+ logfile="$_pidfile_from_conf"
+ fi
+ local rundir=${pidfile%/*}
+ local logdir=${logfile%/*}
+ [ -d $rundir ] || install -d -m 0755 -o zabbix -g zabbix $rundir
+ [ -d $logdir ] || install -d -m 0755 -o zabbix -g zabbix $logdir
+
+ # This shouldn't be necessary with pidfile, but empirically it was the
+ # only way to reap the parent PID instead of all PIDs from
+ # check_process, which may leak SysV IPC objects and prevent restart
+ # and/or race condition on restart.
+ rc_pid=$(check_pidfile ${pidfile} ${command})
+}
+
+zabbix_agentd_cmd()
+{
+ PATH=$zabbix_agentd_paths $command -c $zabbix_agentd_config
+}
+
+run_rc_command "$1"
diff --git a/net-mgmt/zabbix74-server/files/zabbix_java.in b/net-mgmt/zabbix74-server/files/zabbix_java.in
new file mode 100644
index 000000000000..ef0f1318c76c
--- /dev/null
+++ b/net-mgmt/zabbix74-server/files/zabbix_java.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# PROVIDE: zabbix_java
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+#
+# Options to configure zabbix_java via /etc/rc.conf:
+#
+# zabbix_java_enable (bool):
+# Enable service on boot.
+# Default: NO
+#
+
+. /etc/rc.subr
+
+name="zabbix_java"
+rcvar=zabbix_java_enable
+
+load_rc_config $name
+
+: ${zabbix_java_enable:=NO}
+
+start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
+stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
+status_cmd="zabbix_java_status"
+
+extra_commands="status"
+
+zabbix_java_status() {
+ if get_pidfile_from_conf PID_FILE %%PREFIX%%/sbin/zabbix_java/settings.sh; then
+ PID_FILE="$_pidfile_from_conf"
+ fi
+
+ if [ -n "$PID_FILE" -a -f "$PID_FILE" ]; then
+ PID=`cat "$PID_FILE"`
+ if ps -p "$PID" > /dev/null 2>&1; then
+ echo "${name} is running as pid ${PID}"
+ else
+ echo "${name} is not running"
+ fi
+ else
+ echo "${name} is not running"
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net-mgmt/zabbix74-server/files/zabbix_proxy.in b/net-mgmt/zabbix74-server/files/zabbix_proxy.in
new file mode 100644
index 000000000000..0ce9f01f549f
--- /dev/null
+++ b/net-mgmt/zabbix74-server/files/zabbix_proxy.in
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# PROVIDE: zabbix_proxy
+# REQUIRE: DAEMON
+%%PGSQL%%# REQUIRE: postgresql
+%%MYSQL%%# REQUIRE: mysql
+%%MYSQLDV%%# REQUIRE: mysql
+%%MDB5%%# REQUIRE: mysql
+%%MDB6%%# REQUIRE: mysql
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
+# enable zabbix_proxy:
+#
+# zabbix_proxy_enable (bool): Set to NO by default. Set it to YES to
+# enable zabbix_proxy.
+# zabbix_proxy_config (string): Set to the standard config file path by
+# default.
+# zabbix_proxy_pidfile (string): Location of the zabbix_proxy pid file
+# Default is /var/run/zabbix/zabbix_proxy.pid
+# zabbix_proxy_paths (string): Set to standard path by default. Set a search
+# if you have custom userparams that need binaries elsewhere.
+#
+
+. /etc/rc.subr
+
+name="zabbix_proxy"
+rcvar=zabbix_proxy_enable
+
+load_rc_config $name
+
+: ${zabbix_proxy_enable:=NO}
+: ${zabbix_proxy_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_proxy_pidfile:=/var/run/zabbix/zabbix_proxy.pid}
+
+command="%%PREFIX%%/sbin/${name}"
+required_files="${zabbix_proxy_config}"
+
+start_cmd=zabbix_proxy_cmd
+start_precmd=zabbix_proxy_precmd
+status_precmd=zabbix_proxy_precmd
+stop_precmd=zabbix_proxy_precmd
+
+zabbix_proxy_precmd()
+{
+ pidfile=${zabbix_proxy_pidfile}
+ if get_pidfile_from_conf PidFile ${zabbix_proxy_config}; then
+ pidfile="$_pidfile_from_conf"
+ fi
+ logfile=/var/log/zabbix/zabbix_proxy.log
+ if get_pidfile_from_conf LogFile ${zabbix_proxy_config}; then
+ logfile="$_pidfile_from_conf"
+ fi
+ local rundir=${pidfile%/*}
+ local logdir=${logfile%/*}
+ [ -d $rundir ] || install -d -m 0755 -o zabbix -g zabbix $rundir
+ [ -d $logdir ] || install -d -m 0755 -o zabbix -g zabbix $logdir
+
+ # This shouldn't be necessary with pidfile, but empirically it was the
+ # only way to reap the parent PID instead of all PIDs from
+ # check_process, which may leak SysV IPC objects and prevent restart
+ # and/or race condition on restart.
+ rc_pid=$(check_pidfile ${pidfile} ${command})
+}
+
+zabbix_proxy_cmd()
+{
+ PATH=$zabbix_proxy_paths $command -c $zabbix_proxy_config
+}
+
+run_rc_command "$1"
diff --git a/net-mgmt/zabbix74-server/files/zabbix_server.in b/net-mgmt/zabbix74-server/files/zabbix_server.in
new file mode 100644
index 000000000000..8a1fa48a890c
--- /dev/null
+++ b/net-mgmt/zabbix74-server/files/zabbix_server.in
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# PROVIDE: zabbix_server
+# REQUIRE: DAEMON
+%%PGSQL%%# REQUIRE: postgresql
+%%MYSQL%%# REQUIRE: mysql
+%%MYSQLDV%%# REQUIRE: mysql
+%%MDB5%%# REQUIRE: mysql
+%%MDB6%%# REQUIRE: mysql
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
+# enable zabbix_server:
+#
+# zabbix_server_enable (bool): Set to NO by default. Set it to YES to
+# enable zabbix_server.
+# zabbix_server_config (string): Set to the standard config file path by
+# default.
+# zabbix_server_pidfile (string): Location of the zabbix_server pid file
+# Default is /var/run/zabbix/zabbix_server.pid
+# zabbix_server_paths (string): Set to standard path by default. Set a search
+# if you have custom userparams that need binaries elsewhere.
+#
+
+. /etc/rc.subr
+
+name="zabbix_server"
+rcvar=zabbix_server_enable
+
+load_rc_config $name
+
+: ${zabbix_server_enable:=NO}
+: ${zabbix_server_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_server_pidfile:=/var/run/zabbix/zabbix_server.pid}
+: ${zabbix_server_paths:=$PATH}
+
+command="%%PREFIX%%/sbin/${name}"
+required_files="${zabbix_server_config}"
+
+start_cmd=zabbix_server_cmd
+start_precmd=zabbix_server_precmd
+status_precmd=zabbix_server_precmd
+stop_precmd=zabbix_server_precmd
+
+zabbix_server_precmd()
+{
+ pidfile=${zabbix_server_pidfile}
+ if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
+ pidfile="$_pidfile_from_conf"
+ fi
+ logfile=/var/log/zabbix/zabbix_server.log
+ if get_pidfile_from_conf LogFile ${zabbix_server_config}; then
+ logfile="$_pidfile_from_conf"
+ fi
+ local rundir=${pidfile%/*}
+ local logdir=${logfile%/*}
+ [ -d $rundir ] || install -d -m 0755 -o zabbix -g zabbix $rundir
+ [ -d $logdir ] || install -d -m 0755 -o zabbix -g zabbix $logdir
+
+ # This shouldn't be necessary with pidfile, but empirically it was the
+ # only way to reap the parent PID instead of all PIDs from
+ # check_process, which may leak SysV IPC objects and prevent restart
+ # and/or race condition on restart.
+ rc_pid=$(check_pidfile ${pidfile} ${command})
+}
+
+zabbix_server_cmd()
+{
+ PATH=$zabbix_server_paths $command -c $zabbix_server_config
+}
+
+run_rc_command "$1"