head	1.3;
access;
symbols
	RELEASE_8_3_0:1.3
	RELEASE_9_0_0:1.3
	RELEASE_7_4_0:1.3
	RELEASE_8_2_0:1.3
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.1
	RELEASE_4_EOL:1.1
	RELEASE_6_2_0:1.1
	RELEASE_6_1_0:1.1
	RELEASE_5_5_0:1.1
	RELEASE_6_0_0:1.1;
locks; strict;
comment	@# @;


1.3
date	2010.12.13.00.23.32;	author wxs;	state Exp;
branches;
next	1.2;

1.2
date	2007.07.14.22.21.13;	author beech;	state Exp;
branches;
next	1.1;

1.1
date	2005.06.07.20.56.27;	author niels;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Dont declare ${sancp_flags} in command_args.
Drop .sh extension from RC script.
Drop MD5 checksum from distinfo.
Switch from adding & removing users by hand to using USERS & GROUPS.
Dont remove data gathered by app on uninstall, notify user to do it manually
should they wish to.

PR:		ports/152225, ports/152226
Submitted by:	Sevan Janiyan <venture37@@geeklan.co.uk>
Approved by:	pauls@@utdallas.edu (maintainer timeout)
@
text
@#!/bin/sh

if [ "$2" != "POST-INSTALL" ]; then
	exit 0
fi

PATH=/bin:/usr/sbin
LOG_DIR=/var/log/sancp

chmod 750 ${LOG_DIR}
@


1.2
log
@- Update to 1.6.1_2
- Minor fixes

PR:		ports/114390
Submitted by:	Paul Schmehl <pauls@@utdallas.edu> (maintainer)
Approved by:	sat (mentor)
@
text
@a7 2
USER=sancp
GROUP=${USER}
a9 34
if [ ! -d ${LOG_DIR} ]; then mkdir ${LOG_DIR}; fi

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."
	if pw usermod ${USER} -d ${LOG_DIR}
	then
		echo "Changed home directory of \"${USER}\" to \"${LOG_DIR}\""
	else
		echo "Changing home directory of \"${USER}\" to \"${LOG_DIR}\" failed..."
		exit 1
	fi
else
	if pw useradd ${USER} -g ${GROUP} -h - \
		-d ${LOG_DIR} -s /sbin/nologin -c "SANCP Daemon"
	then
		echo "Added user \"${USER}\"."
	else
		echo "Adding user \"${USER}\" failed..."
		exit 1
	fi
fi

chown -R ${USER}:${GROUP} ${LOG_DIR}
@


1.1
log
@New port based on submission by Paul Schmehl

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)
@
text
@d3 4
@

