1#
2#  Read docs/INSTALL first to compile binary
3#
4#
5# This a is quick script to get
6# Sancp up and running as a non-root user
7# Note: pcap chroot not yet supported
8#  to run, type:   ./install.sh
9#
10#
11
12if [ ! -x sancp ]; then
13
14	echo
15	echo "Please, read docs/INSTALL first to compile the sancp binary, first"
16	echo
17
18else
19
20adduser sancp
21groupadd sancp
22
23install -D -C sancp /usr/local/bin/sancp
24
25install -D -C etc/sancp/sancp.conf /etc/sancp/sancp.conf
26
27if [ -d /etc/init.d ]; then
28	install -D -C etc/init.d/sancpd /etc/init.d/sancpd
29fi
30
31if [ ! -d /var/log/sancp ]; then
32	mkdir -p /var/log/sancp
33fi
34
35chown -R sancp:sancp /var/log/sancp/
36chown -R sancp:sancp /etc/sancp/
37
38echo
39echo Please edit: /etc/sancp/sancp.conf
40echo
41
42if [ -e /etc/init.d/sancpd ]; then
43	echo To start sancp run: /etc/init.d/sancpd start
44	echo
45else
46	echo Copy etc/init.d/sancpd to proper start-up directory
47	echo  and run 'sancpd start' from there
48fi
49fi
50