summaryrefslogtreecommitdiffstats
path: root/startup
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 11:05:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 11:05:42 +0000
commit305857535615c13098272b678a72000b021a7fc3 (patch)
tree588d04c9a14561b6bc6d3e5ef09d413692a36771 /startup
parentInitial commit. (diff)
downloadnagios-nrpe-305857535615c13098272b678a72000b021a7fc3.tar.xz
nagios-nrpe-305857535615c13098272b678a72000b021a7fc3.zip
Adding upstream version 4.0.3.upstream/4.0.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'startup')
-rw-r--r--startup/bsd-init.in90
-rw-r--r--startup/debian-init.in47
-rw-r--r--startup/default-inetd.in5
-rw-r--r--startup/default-init.in157
-rw-r--r--startup/default-service.in24
-rw-r--r--startup/default-socket-svc.in16
-rw-r--r--startup/default-socket.in12
-rw-r--r--startup/default-xinetd.in15
-rw-r--r--startup/gentoo-init.in49
-rw-r--r--startup/mac-inetd.plist.in40
-rw-r--r--startup/mac-init.plist.in32
-rw-r--r--startup/newbsd-init.in35
-rw-r--r--startup/openbsd-init.in18
-rw-r--r--startup/openrc-conf.in7
-rw-r--r--startup/openrc-init.in21
-rw-r--r--startup/rh-upstart-init.in17
-rw-r--r--startup/solaris-inetd.xml.in90
-rw-r--r--startup/solaris-init.xml.in143
-rw-r--r--startup/tmpfile.conf.in2
-rw-r--r--startup/upstart-init.in19
20 files changed, 839 insertions, 0 deletions
diff --git a/startup/bsd-init.in b/startup/bsd-init.in
new file mode 100644
index 0000000..96551ae
--- /dev/null
+++ b/startup/bsd-init.in
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+# Start/stop/restart/reload nrpe
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+
+NRPE_BIN=@sbindir@/nrpe
+NRPE_CFG=@pkgsysconfdir@/nrpe.cfg
+PID_DIR=@piddir@
+PID_FILE=@piddir@/nrpe.pid
+
+# Start nrpe
+nrpe_start() {
+ echo -n "Starting nrpe daemon: $NRPE_BIN - "
+ if [ ! -d "$PID_DIR" ]; then
+ mkdir -p "$PID_DIR"
+ fi
+ $NRPE_BIN -c $NRPE_CFG -d
+ if [ $? = 0 ]; then
+ echo "started"
+ else
+ echo "failed"
+ fi
+}
+
+# Stop nrpe
+nrpe_stop() {
+ echo -n "Stopping nrpe daemon - "
+ if [ -r "$PID_FILE" ]; then
+ kill $(cat "$PID_FILE")
+ else
+ killall nrpe
+ fi
+ if [ $? = 0 ]; then
+ echo "stopped"
+ else
+ echo "failed"
+ fi
+}
+
+# Restart nrpe
+nrpe_restart() {
+ nrpe_stop
+ sleep 1
+ nrpe_start
+}
+
+# Reload nrpe
+nrpe_reload() {
+ echo -n "Reloading nrpe daemon - "
+ if [ -r "$PID_FILE" ]; then
+ kill -HUP $(cat "$PID_FILE")
+ else
+ killall -HUP nrpe
+ fi
+ if [ $? = 0 ]; then
+ echo "reloaded"
+ else
+ echo "failed"
+ fi
+}
+
+# nrpe status
+nrpe_status() {
+ if ps -C nrpe >/dev/null; then
+ echo "nrpe is running."
+ else
+ echo "nrpe is stopped."
+ fi
+}
+
+case "$1" in
+'start')
+ nrpe_start
+ ;;
+'stop')
+ nrpe_stop
+ ;;
+'restart')
+ nrpe_restart
+ ;;
+'reload')
+ nrpe_reload
+ ;;
+'status')
+ nrpe_status
+ ;;
+*)
+ echo "Usage $0 start|stop|restart|reload|status"
+ ;;
+esac
diff --git a/startup/debian-init.in b/startup/debian-init.in
new file mode 100644
index 0000000..47341a5
--- /dev/null
+++ b/startup/debian-init.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+#
+# Start/stop the nrpe daemon.
+
+NRPE_BIN=@sbindir@/nrpe
+NRPE_CFG=@pkgsysconfdir@/nrpe.cfg
+PID_FILE=@piddir@/nrpe.pid
+
+test -x $NRPE_BIN || exit 0
+
+case "$1" in
+
+start)
+ echo -n "Starting nagios remote plugin daemon: nrpe"
+ start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d
+ echo "."
+ ;;
+
+stop)
+ echo -n "Stopping nagios remote plugin daemon: nrpe"
+ start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN
+ echo "."
+ ;;
+
+restart|force-reload)
+ echo -n "Restarting nagios remote plugin daemon: nrpe"
+ start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN
+ start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d
+ echo "."
+ ;;
+
+reload)
+ echo -n "Reloading configuration files for nagios remote plugin daemon: nrpe"
+ test -f $PID_FILE || exit 0
+ test -x /bin/kill && /bin/kill -HUP `cat $PID_FILE`
+ echo "."
+ ;;
+
+*)
+ echo "Usage: $0 start|stop|restart|reload|force-reload"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/startup/default-inetd.in b/startup/default-inetd.in
new file mode 100644
index 0000000..04837c9
--- /dev/null
+++ b/startup/default-inetd.in
@@ -0,0 +1,5 @@
+#
+# Enable the following entry to enable the nrpe daemon
+#nrpe stream tcp nowait @nrpe_user@ @sbindir@/nrpe nrpe -c @pkgsysconfdir@/nrpe.cfg --inetd
+# Enable the following entry if the nrpe daemon didn't link with libwrap
+#nrpe stream tcp nowait @nrpe_user@ /usr/sbin/tcpd @sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg --inetd
diff --git a/startup/default-init.in b/startup/default-init.in
new file mode 100644
index 0000000..b0f02a2
--- /dev/null
+++ b/startup/default-init.in
@@ -0,0 +1,157 @@
+#!/bin/sh
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+#
+# chkconfig: - 80 30
+# description: Starts and stops the Nagios Remote Plugin Executor \
+# so a remote nagios server can run plugins on this host
+#
+### BEGIN INIT INFO
+# Provides: nrpe
+# Required-Start: $local_fs $remote_fs $time
+# Required-Stop: $local_fs $remote_fs
+# Should-Start: $syslog $network
+# Should-Stop: $syslog $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts and stops the Nagios Remote Plugin Executor
+# Description: Starts and stops the Nagios Remote Plugin Executor
+# so a remote nagios server can run plugins on this host
+### END INIT INFO
+
+
+NRPE_BIN=@sbindir@/nrpe
+NRPE_CFG=@pkgsysconfdir@/nrpe.cfg
+LOCK_DIR=@subsyslockdir@
+LOCK_FILE=@subsyslockfile@
+PID_FILE=@piddir@/nrpe.pid
+
+test -x $NRPE_BIN || exit 5
+
+RETVAL=0
+_set_rc (){ return; }
+
+# Default these commands/functions to RedHat/CentOS etc. values
+MSG_CMD="echo -n"
+START_CMD="daemon --pidfile $PID_FILE"
+TERM_CMD="killproc -p $PID_FILE $NRPE_BIN -TERM"
+HUP_CMD="killproc -p $PID_FILE $NRPE_BIN -HUP"
+PRT_STAT="echo"
+STAT_MSG="echo -n Checking for nrpe daemon... "
+STAT_CMD="status nrpe"
+EXIT_CMD="exit"
+
+
+# Source the function library
+if [ -f /etc/rc.status ]; then
+
+ . /etc/rc.status
+
+ _set_rc (){ return $RETVAL; }
+
+ # Set these commands/functions to SuSE etc. values
+ START_CMD="startproc -p $PID_FILE"
+ TERM_CMD="killproc -p $PID_FILE -TERM $NRPE_BIN"
+ HUP_CMD="killproc -p $PID_FILE -HUP $NRPE_BIN"
+ PRT_STAT="rc_status -v -r"
+ STAT_CMD="checkproc -p $PID_FILE $NRPE_BIN"
+ EXIT_CMD="rc_exit"
+ rc_reset
+
+elif [ -f /etc/rc.d/init.d/functions ]; then
+
+ . /etc/rc.d/init.d/functions
+
+elif [ -f /etc/init.d/functions ]; then
+
+ . /etc/init.d/functions
+
+elif [ -f /lib/lsb/init-functions ]; then
+
+ . /lib/lsb/init-functions
+
+ MSG_CMD="log_daemon_msg"
+ START_CMD="start_daemon -p $PID_FILE"
+ PRT_STAT="log_end_msg"
+ STAT_MSG=
+ STAT_CMD="status_of_proc -p $PID_FILE $NRPE_BIN nrpe"
+
+elif [ -f /etc/rc.d/functions ]; then
+
+ . /etc/rc.d/functions
+
+fi
+
+
+# See how we were called.
+case "$1" in
+
+start)
+ # Start daemons.
+ $MSG_CMD "Starting nrpe "
+ $START_CMD $NRPE_BIN -c $NRPE_CFG -d
+ RETVAL=$?
+ if test "$PRT_STAT" = log_end_msg; then
+ $PRT_STAT $RETVAL
+ else
+ _set_rc; $PRT_STAT
+ fi
+ if [ $RETVAL = 0 ]; then
+ [ -d $LOCK_DIR ] && touch $LOCK_FILE || true
+ fi
+ ;;
+
+stop)
+ # Stop daemons.
+ $MSG_CMD "Shutting down nrpe "
+ $TERM_CMD
+ RETVAL=$?
+ if test "$PRT_STAT" = log_end_msg; then
+ $PRT_STAT $RETVAL
+ else
+ _set_rc; $PRT_STAT
+ fi
+ if [ $RETVAL = 0 ]; then
+ [ -d $LOCK_DIR ] && rm -f $LOCK_FILE
+ fi
+ ;;
+
+restart|force-reload)
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+
+reload)
+ $MSG_CMD "Reloading nrpe "
+ $HUP_CMD
+ RETVAL=$?
+ if test "$PRT_STAT" = log_end_msg; then
+ $PRT_STAT $RETVAL
+ else
+ _set_rc; $PRT_STAT
+ fi
+ ;;
+
+try-restart|condrestart)
+ $STAT_CMD || exit 0
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+
+status)
+ $STAT_MSG
+ $STAT_CMD
+ RETVAL=$?
+ if test "$PRT_STAT" != log_end_msg; then
+ _set_rc; $PRT_STAT
+ fi
+ ;;
+
+*)
+ echo "Usage: nrpe {start|stop|restart|reload|try-restart|condrestart|status}"
+ exit 1
+esac
+
+$EXIT_CMD $RETVAL
diff --git a/startup/default-service.in b/startup/default-service.in
new file mode 100644
index 0000000..b6c6063
--- /dev/null
+++ b/startup/default-service.in
@@ -0,0 +1,24 @@
+[Unit]
+Description=Nagios Remote Plugin Executor
+Documentation=http://www.nagios.org/documentation
+After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target
+Before=getty@tty1.service plymouth-quit.service xdm.service
+Conflicts=nrpe.socket
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+Restart=on-abort
+PIDFile=@piddir@/nrpe.pid
+RuntimeDirectory=nrpe
+RuntimeDirectoryMode=0755
+ExecStart=@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStopPost=/bin/rm -f @piddir@/nrpe.pid
+TimeoutStopSec=60
+User=@nrpe_user@
+Group=@nrpe_group@
+PrivateTmp=true
+OOMScoreAdjust=-500
diff --git a/startup/default-socket-svc.in b/startup/default-socket-svc.in
new file mode 100644
index 0000000..7e6acac
--- /dev/null
+++ b/startup/default-socket-svc.in
@@ -0,0 +1,16 @@
+[Unit]
+Description=Nagios Remote Plugin Executor
+Documentation=http://www.nagios.org/documentation
+After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target
+
+[Service]
+Restart=on-failure
+ExecStart=@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg --inetd
+KillMode=process
+User=@nrpe_user@
+Group=@nrpe_group@
+PrivateTmp=true
+OOMScoreAdjust=-500
+
+[Install]
+WantedBy=multi-user.target
diff --git a/startup/default-socket.in b/startup/default-socket.in
new file mode 100644
index 0000000..0921fe8
--- /dev/null
+++ b/startup/default-socket.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Nagios Remote Plugin Executor
+Documentation=http://www.nagios.org/documentation
+Before=nrpe.service
+Conflicts=nrpe.service
+
+[Socket]
+ListenStream=@nrpe_port@
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/startup/default-xinetd.in b/startup/default-xinetd.in
new file mode 100644
index 0000000..eaeacf4
--- /dev/null
+++ b/startup/default-xinetd.in
@@ -0,0 +1,15 @@
+# default: off
+# description: NRPE (Nagios Remote Plugin Executor)
+service nrpe
+{
+ disable = yes
+ socket_type = stream
+ port = @nrpe_port@
+ wait = no
+ user = @nrpe_user@
+ group = @nrpe_group@
+ server = @sbindir@/nrpe
+ server_args = -c @pkgsysconfdir@/nrpe.cfg --inetd
+ only_from = 127.0.0.1 ::1
+ log_on_success =
+}
diff --git a/startup/gentoo-init.in b/startup/gentoo-init.in
new file mode 100644
index 0000000..c7adc55
--- /dev/null
+++ b/startup/gentoo-init.in
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+#
+# Start/stop the nrpe daemon.
+#
+# Goes in /etc/init.d - Config is in /etc/conf.d/nrpe
+
+extra_started_commands="reload"
+
+NRPE_BIN="@sbindir@/nrpe"
+NRPE_PID="@piddir@/nrpe.pid"
+NRPE_CFG=@pkgsysconfdir@/nrpe.cfg
+
+depend() {
+ use logger dns net localmount netmount nfsmount
+}
+
+checkconfig() {
+ # Make sure the config file exists
+ if [ ! -f $NRPE_CFG ]; then
+ eerror "You need to setup $NRPE_CFG."
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting nrpe"
+ # Make sure we have a sane current directory
+ cd /
+ start-stop-daemon --start --exec $NRPE_BIN --pidfile $NRPE_PID \
+ --background -- -c $NRPE_CFG -f $NRPE_OPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nrpe"
+ start-stop-daemon --stop --exec $NRPE_BIN --pidfile $NRPE_PID
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading nrpe"
+ start-stop-daemon --stop --oknodo --exec $NRPE_BIN \
+ --pidfile $NRPE_PID --signal HUP
+ eend $?
+}
diff --git a/startup/mac-inetd.plist.in b/startup/mac-inetd.plist.in
new file mode 100644
index 0000000..45197ea
--- /dev/null
+++ b/startup/mac-inetd.plist.in
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>org.nagios.nrpe</string>
+ <key>UserName</key>
+ <string>@nrpe_user@</string>
+ <key>GroupName</key>
+ <string>@nrpe_group@</string>
+ <key>Program</key>
+ <string>@sbindir@/nrpe</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>nrpe</string>
+ <string>-c</string>
+ <string>@pkgsysconfdir@/nrpe.cfg</string>
+ <string>-i</string>
+ </array>
+ <key>Sockets</key>
+ <dict>
+ <key>Listeners</key>
+ <dict>
+ <key>SockServiceName</key>
+ <string>5666</string>
+ <key>SockType</key>
+ <string>stream</string>
+ <key>SockFamily</key>
+ <string>IPv4</string>
+ </dict>
+ </dict>
+ <key>inetdCompatibility</key>
+ <dict>
+ <key>Wait</key>
+ <false/>
+ </dict>
+ <key>ProcessType</key>
+ <string>Background</string>
+</dict>
+</plist>
diff --git a/startup/mac-init.plist.in b/startup/mac-init.plist.in
new file mode 100644
index 0000000..f51c498
--- /dev/null
+++ b/startup/mac-init.plist.in
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>org.nagios.nrpe</string>
+ <key>UserName</key>
+ <string>@nrpe_user@</string>
+ <key>GroupName</key>
+ <string>@nrpe_group@</string>
+ <key>Program</key>
+ <string>@sbindir@/nrpe</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>nrpe</string>
+ <string>-c</string>
+ <string>@pkgsysconfdir@/nrpe.cfg</string>
+ <string>-f</string>
+ </array>
+ <key>KeepAlive</key>
+ <dict>
+ <key>SuccessfulExit</key>
+ <false/>
+ <key>NetworkState</key>
+ <true/>
+ </dict>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>ProcessType</key>
+ <string>Background</string>
+</dict>
+</plist>
diff --git a/startup/newbsd-init.in b/startup/newbsd-init.in
new file mode 100644
index 0000000..aa4ed45
--- /dev/null
+++ b/startup/newbsd-init.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+#
+# PROVIDE: nrpe
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+: ${nrpe@bsd_enable@:="NO"}
+: ${nrpe_configfile:="@pkgsysconfdir@/nrpe.cfg"}
+
+name=nrpe
+command="@sbindir@/nrpe"
+command_args="-c $nrpe_configfile -d"
+pidfile="@piddir@/nrpe.pid"
+extra_commands=reload
+sig_reload=HUP
+rcvar=nrpe@bsd_enable@
+load_rc_config "$name"
+required_files="$nrpe_configfile"
+sig_reload=HUP
+
+start_precmd=nrpe_prestart
+
+nrpe_prestart()
+{
+ [ -n "$nrpe_pidfile" ] &&
+ warn "No longer necessary to set nrpe_pidfile in rc.conf[.local]"
+
+ install -d -o @nrpe_user@ ${pidfile%/*}
+}
+
+run_rc_command "$1"
diff --git a/startup/openbsd-init.in b/startup/openbsd-init.in
new file mode 100644
index 0000000..1713646
--- /dev/null
+++ b/startup/openbsd-init.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+#
+
+daemon="@sbindir@/nrpe"
+
+. /etc/rc.d/rc.subr
+
+rc_pre() {
+ install -d -o @nrpe_user@ ${pidfile%/*}
+}
+
+rc_reload() {
+ pkill -HUP -xf "${pexp}"
+}
+
+rc_cmd "$1"
diff --git a/startup/openrc-conf.in b/startup/openrc-conf.in
new file mode 100644
index 0000000..1e6bd84
--- /dev/null
+++ b/startup/openrc-conf.in
@@ -0,0 +1,7 @@
+# /etc/conf.d/nrpe : config file for /etc/init.d/nrpe
+
+# The configuration file to use.
+NRPE_CFG="@sysconfdir@/nrpe.cfg"
+
+# Any additional options (e.g. -n -4 -6) to pass to the nrpe daemon.
+NRPE_OPTS=""
diff --git a/startup/openrc-init.in b/startup/openrc-init.in
new file mode 100644
index 0000000..c123c95
--- /dev/null
+++ b/startup/openrc-init.in
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+#
+# Copyright (c) 2017 Nagios(R) Core(TM) Development Team
+#
+
+# Supply a default value for NRPE_CFG in case the corresponding
+# conf.d file is not installed.
+: ${NRPE_CFG:="@sysconfdir@/nrpe.cfg"}
+
+command="@sbindir@/nrpe"
+command_args="--config=${NRPE_CFG} ${NRPE_OPTS}"
+command_args_background="--daemon"
+description="Nagios Remote Plugin Executor (NRPE) daemon"
+extra_started_commands="reload"
+pidfile="@piddir@/${RC_SVCNAME}.pid"
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/startup/rh-upstart-init.in b/startup/rh-upstart-init.in
new file mode 100644
index 0000000..58bf3b5
--- /dev/null
+++ b/startup/rh-upstart-init.in
@@ -0,0 +1,17 @@
+# nrpe - the Nagios Remote Plugin Executor
+#
+# nrpe is a program that runs plugins on this host
+# and reports the results back to a nagios server
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+
+description "the Nagios Remote Plugin Executor"
+
+oom -10
+
+start on started network
+stop on runlevel [!2345]
+
+respawn
+
+exec @sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f
diff --git a/startup/solaris-inetd.xml.in b/startup/solaris-inetd.xml.in
new file mode 100644
index 0000000..85a0a5b
--- /dev/null
+++ b/startup/solaris-inetd.xml.in
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+
+<!--
+ Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+-->
+
+<service_bundle type='manifest' name='NGOS:nrpe'>
+
+ <service
+ name='network/nagios/nrpe'
+ type='service'
+ version='1'>
+
+ <restarter>
+ <service_fmri value='svc:/network/inetd:default' />
+ </restarter>
+
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost@sysconfdir@/nrpe.cfg' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='inetd_start'
+ exec='@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -i'
+ timeout_seconds='0'>
+ <method_context>
+ <method_credential user='@nrpe_user@' group='@nrpe_group@'/>
+ </method_context>
+ </exec_method>
+
+ <exec_method
+ type='method'
+ name='inetd_offline'
+ exec=':kill_process'
+ timeout_seconds='0'/>
+
+ <exec_method
+ type='method'
+ name='inetd_disable'
+ exec=':kill'
+ timeout_seconds='0'/>
+
+ <property_group name='inetd' type='framework'>
+ <stability value='Evolving' />
+ <propval name='name' type='astring' value='nrpe' />
+ <propval name='endpoint_type' type='astring' value='stream' />
+ <propval name='proto' type='astring' value='tcp' />
+ <propval name='wait' type='boolean' value='false' />
+ <propval name='isrpc' type='boolean' value='false' />
+ </property_group>
+
+ <property_group name='general' type='framework'>
+ <propval name='enabled'
+ type='boolean'
+ value='false'/>
+ <propval name='action_authorization'
+ type='astring'
+ value='solaris.smf.manage.nrpe'/>
+ <propval name='value_authorization'
+ type='astring'
+ value='solaris.smf.manage.nrpe'/>
+ </property_group>
+
+ <instance name='default' enabled='false' />
+
+ <stability value='Unstable' />
+
+ <template>
+ <common_name>
+ <loctext xml:lang="C">NRPE daemon</loctext>
+ </common_name>
+ <description>
+ <loctext xml:lang="C">
+ Nagios Remote Plugin Executor daemon
+ </loctext>
+ </description>
+ <documentation>
+ <doc_link name='nagios.org' uri='http://www.nagios.org' />
+ </documentation>
+ </template>
+
+ </service>
+
+</service_bundle>
diff --git a/startup/solaris-init.xml.in b/startup/solaris-init.xml.in
new file mode 100644
index 0000000..e4ff84c
--- /dev/null
+++ b/startup/solaris-init.xml.in
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+
+<!--
+ Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+-->
+
+<service_bundle type='manifest' name='NGOS:nrpe'>
+
+ <service
+ name='network/nagios/nrpe'
+ type='service'
+ version='1'>
+
+ <single_instance />
+
+ <dependency
+ name='fs-local'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+
+ <dependency
+ name='autofs'
+ grouping='optional_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/filesystem/autofs' />
+ </dependency>
+
+ <dependency
+ name='net-loopback'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/loopback' />
+ </dependency>
+
+ <dependency
+ name='net-physical'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/physical' />
+ </dependency>
+
+ <dependency
+ name='cryptosvc'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/cryptosvc' />
+ </dependency>
+
+ <dependency
+ name='utmp'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/utmp' />
+ </dependency>
+
+ <dependency
+ name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost@sysconfdir@/nrpe.cfg' />
+ </dependency>
+
+ <dependency
+ name='system-log'
+ grouping='optional_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/system-log' />
+ </dependency>
+
+ <dependent
+ name='nrpe_multi-user-server'
+ grouping='optional_all'
+ restart_on='none'>
+ <service_fmri value='svc:/milestone/multi-user-server'/>
+ </dependent>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -d'
+ timeout_seconds='5'>
+ <method_context>
+ <method_credential user='@nrpe_user@' group='@nrpe_group@'/>
+ </method_context>
+ </exec_method>
+
+ <exec_method
+ type='method'
+ name='stop'
+ exec=':kill'
+ timeout_seconds='60'/>
+
+ <exec_method
+ type='method'
+ name='refresh'
+ exec=':hup'
+ timeout_seconds='60'/>
+
+ <property_group name='startd' type='framework'>
+ <propval name='ignore_error' type='astring' value='core,signal'/>
+ </property_group>
+
+ <property_group name='general' type='framework'>
+ <propval name='enabled' type='boolean' value='false'/>
+ <propval name='action_authorization' type='astring'
+ value='solaris.smf.manage.nrpe'/>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.manage.nrpe'/>
+ </property_group>
+
+ <instance name='default' enabled='false' />
+
+ <stability value='Unstable' />
+
+ <template>
+ <common_name>
+ <loctext xml:lang="C">NRPE daemon</loctext>
+ </common_name>
+ <description>
+ <loctext xml:lang="C">
+ Nagios Remote Plugin Executor daemon
+ </loctext>
+ </description>
+ <documentation>
+ <doc_link name='nagios.org' uri='http://www.nagios.org' />
+ </documentation>
+ </template>
+
+ </service>
+
+</service_bundle>
diff --git a/startup/tmpfile.conf.in b/startup/tmpfile.conf.in
new file mode 100644
index 0000000..9db7ca6
--- /dev/null
+++ b/startup/tmpfile.conf.in
@@ -0,0 +1,2 @@
+#Type Path Mode UID GID Age Argument
+d @piddir@ 0755 @nrpe_user@ @nrpe_group@ - -
diff --git a/startup/upstart-init.in b/startup/upstart-init.in
new file mode 100644
index 0000000..ec16d7d
--- /dev/null
+++ b/startup/upstart-init.in
@@ -0,0 +1,19 @@
+# nrpe - the Nagios Remote Plugin Executor
+#
+# nrpe is a program that runs plugins on this host
+# and reports the results back to a nagios server
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+
+description "the Nagios Remote Plugin Executor"
+
+oom score -800
+setgid @nrpe_group@
+setuid @nrpe_user@
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
+
+respawn
+
+exec @sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f