Add create source

This commit is contained in:
Nico Schottelius 2007-08-07 07:48:52 +02:00
parent d0a6190203
commit a92d28db16
1 changed files with 22 additions and 0 deletions

22
tools/create_source.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/sh
# Nico Schottelius
# 2007-08-07
# Written for Netstream (www.netstream.ch)
# Creates a source, including exclude
if [ $# -ne 1 ]; then
echo $(basename $0): name
exit 1
fi
CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect}
CSOURCES=$CCOLLECT_CONF/sources
CDEFAULTS=$CCOLLECT_CONF/defaults
name="$1"
fullname="${CSOURCES}/${name}"
if [ -e "${fullname}" ]; then
echo "${fullname} already exists. Aborting."
exit 2
fi