Add create source
This commit is contained in:
parent
d0a6190203
commit
a92d28db16
1 changed files with 22 additions and 0 deletions
22
tools/create_source.sh
Normal file
22
tools/create_source.sh
Normal 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
|
Loading…
Reference in a new issue