mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
7eb5b4f04c
interface and disk statistics every 5 seconds. It sends this data on to symux for further processing. symon has been designed to inflict minimal performance and security impact -- it can be run as nobody on the system it monitors. symux is a non-priviledged daemon that listens to incoming symon traffic. symux can write the incoming symon streams into rrd files. Clients interested in monitoring machine state can also log into symux and receive data as ascii as it arrives. symon2web is a php script that can show the data stored in the rrd files. PR: ports/78416 Submitted by: Ulrich Spoerlein <q@uni.de>
25 lines
473 B
Bash
25 lines
473 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/usr/sbin
|
|
|
|
USER=_symon
|
|
GROUP=daemon
|
|
UID=115
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
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} -u ${UID} -g ${GROUP} -h - \
|
|
-s /usr/sbin/nologin -L daemon -d /var/empty -c "Symon Account"
|
|
then
|
|
echo "Added user \"${USER}\"."
|
|
else
|
|
echo "Adding user \"${USER}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|