mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
4c30e8b53d
Sancp is a network security tool designed to collect statistical information regarding network traffic, as well as, collect the traffic itself in pcap format, all for the purpose of: auditing, historical analysis, and network activity discovery. PR: ports/77426 Submitted by: Paul Schmehl Approved by: nectar (mentor)
29 lines
527 B
Bash
29 lines
527 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/usr/sbin
|
|
USER=sancp
|
|
GROUP=${USER}
|
|
LOG_DIR=/var/log/sancp
|
|
|
|
# Remove the log directory
|
|
if [ -d ${LOG_DIR} ];
|
|
then
|
|
rmdir ${LOG_DIR} >/dev/null 2>&1;
|
|
fi
|
|
|
|
if pw user show "${USER}" >/dev/null 2>&1; then
|
|
if ! pw userdel ${USER} ;
|
|
then
|
|
echo "Unable to remove user: ${USER}, remove it manually"
|
|
fi
|
|
fi
|
|
|
|
|
|
if pw group show "${GROUP}" >/dev/null 2>&1; then
|
|
if ! pw groupdel ${GROUP} ;
|
|
then
|
|
echo "Unable to remove group: ${GROUP}, remove it manually"
|
|
fi
|
|
fi
|
|
|