aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/netxms/files
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2007-09-07 12:15:26 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2007-09-07 12:15:26 +0000
commitd20b297245441dbb727f8bf86a74e5fe4ba38d4f (patch)
treea4fe2aa73ad9635fdbdb8985a8447ee31f202fd2 /net-mgmt/netxms/files
parent32961afd4f7d7fbd1ef5ade0f3e161a8a63357a1 (diff)
downloadports-d20b297245441dbb727f8bf86a74e5fe4ba38d4f.tar.gz
ports-d20b297245441dbb727f8bf86a74e5fe4ba38d4f.zip
[NEW PORT] net-mgmt/netxms: NetXMS - network monitoring system
NetXMS is new and rapidly developing monitoring system, released under GPL2 license. It can be used for monitoring entire IT infrastructure, starting with SNMP-capable hardware (like switches and routers) and ending with applications on your servers. NetXMS is an extremely reliable and powerful monitoring system, enabling you to improve your network availability and service levels. WWW: http://www.netxms.org/ PR: ports/114495 Submitted by: samflanker@gmail.com
Notes
Notes: svn path=/head/; revision=199024
Diffstat (limited to 'net-mgmt/netxms/files')
-rw-r--r--net-mgmt/netxms/files/netxmsd.in30
-rw-r--r--net-mgmt/netxms/files/nxagentd.in30
-rw-r--r--net-mgmt/netxms/files/nxhttpd.in30
-rw-r--r--net-mgmt/netxms/files/pkg-deinstall.in35
-rw-r--r--net-mgmt/netxms/files/pkg-install.in46
5 files changed, 171 insertions, 0 deletions
diff --git a/net-mgmt/netxms/files/netxmsd.in b/net-mgmt/netxms/files/netxmsd.in
new file mode 100644
index 000000000000..99b4adf42711
--- /dev/null
+++ b/net-mgmt/netxms/files/netxmsd.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: netxmsd
+# REQUIRE: mysql postgresql
+# KEYWORD: shutdown
+#
+#
+#
+# Add the following line to /etc/rc.conf[.local] to enable netxmsd
+#
+# netxmsd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable netxmsd.
+#
+
+. %%RC_SUBR%%
+
+name="netxmsd"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${netxmsd_enable="NO"}
+
+command="%%PREFIX%%/bin/netxmsd"
+required_files="%%PREFIX%%/etc/netxmsd.conf"
+command_args="--config %%PREFIX%%/etc/netxmsd.conf --check-db"
+
+run_rc_command "$1"
diff --git a/net-mgmt/netxms/files/nxagentd.in b/net-mgmt/netxms/files/nxagentd.in
new file mode 100644
index 000000000000..dc5244541bd6
--- /dev/null
+++ b/net-mgmt/netxms/files/nxagentd.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: nxagentd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+#
+# Add the following line to /etc/rc.conf[.local] to enable nxagentd
+#
+# nxagentd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable nxagentd.
+#
+
+. %%RC_SUBR%%
+
+name="nxagentd"
+nxagentd_user="netxms"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${nxagentd_enable="NO"}
+
+command="%%PREFIX%%/bin/nxagentd"
+required_files="%%PREFIX%%/etc/nxagentd.conf"
+command_args="-c %%PREFIX%%/etc/nxagentd.conf -d"
+
+run_rc_command "$1"
diff --git a/net-mgmt/netxms/files/nxhttpd.in b/net-mgmt/netxms/files/nxhttpd.in
new file mode 100644
index 000000000000..0039c834ec4d
--- /dev/null
+++ b/net-mgmt/netxms/files/nxhttpd.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: nxhttpd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+#
+# Add the following line to /etc/rc.conf[.local] to enable nxhttpd
+#
+# nxhttpd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable nxagentd.
+#
+
+. %%RC_SUBR%%
+
+name="nxhttpd"
+nxhttpd_user="netxms"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${nxhttpd_enable="NO"}
+
+command="%%PREFIX%%/bin/nxhttpd"
+required_files="%%PREFIX%%/etc/nxhttpd.conf"
+command_args="-c %%PREFIX%%/etc/nxhttpd.conf -d"
+
+run_rc_command "$1"
diff --git a/net-mgmt/netxms/files/pkg-deinstall.in b/net-mgmt/netxms/files/pkg-deinstall.in
new file mode 100644
index 000000000000..f2bcd396c9a6
--- /dev/null
+++ b/net-mgmt/netxms/files/pkg-deinstall.in
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# $FreeBSD$
+
+PATH=/bin:/usr/sbin
+TSHOME=${PKG_PREFIX}/share/netxms
+
+USER=netxms
+GROUP=${USER}
+
+case "$2" in
+POST-DEINSTALL)
+ if pw group show "${GROUP}" 2>/dev/null; then
+ if pw groupdel ${GROUP}; then
+ echo "Removed group \"${GROUP}\"."
+ else
+ echo "Removing group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ else
+ echo "Group \"${GROUP}\" doesn't exist!"
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ if pw userdel ${USER}; then
+ echo "Removed user \"${USER}\"."
+ else
+ echo "Removing user \"${USER}\" failed..."
+ exit 1
+ fi
+ else
+ echo "User \"${USER}\" doesn't exist!"
+ fi
+ ;;
+esac
diff --git a/net-mgmt/netxms/files/pkg-install.in b/net-mgmt/netxms/files/pkg-install.in
new file mode 100644
index 000000000000..07bb6446826d
--- /dev/null
+++ b/net-mgmt/netxms/files/pkg-install.in
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+# $FreeBSD$
+
+PATH=/bin:/usr/sbin
+TSHOME=${PKG_PREFIX}/share/netxms
+
+USER=netxms
+GROUP=${USER}
+
+case "$2" in
+PRE-INSTALL)
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if pw useradd ${USER} -g ${GROUP} -h - \
+ -d /nonexistent -s /sbin/nologin -c "NetXMS"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if ! [ -x ~${USER} ] ; then
+ mkdir -p ${TSHOME}
+ chown ${USER}:${GROUP} ${TSHOME}
+ fi
+ ;;
+POST-INSTALL)
+ chown -R ${USER}:${GROUP} ${TSHOME}
+ chmod -R u+w,o-rx ${TSHOME}
+ ;;
+esac