new: Added local/remote server configs

pull/7/head
Hannah Ward 2017-03-30 16:31:50 +01:00
parent b17c60f85a
commit 79dc58a0af
No known key found for this signature in database
GPG Key ID: 6F3BAD60DE190290
1 changed files with 18 additions and 2 deletions

View File

@ -9,10 +9,26 @@ if [ ! -d $CONFIGDIR ]; then
mkdir -p $CONFIGDIR;
fi
if [ ! -f $CONFIGDIR/local-server.yml ]; then
echo "Creating local server configuration at $CONFIGDIR"
cat >> $CONFIGDIR/local-server.yml << EOF
host: localhost
port: 9000
discovery_path:
use_https: False
taxii_version: '1.1'
headers:
auth:
username:
password:
collection:
EOF
fi
echo "FRIENDLY SERVER NAME:"
read SNAME
cat >> $CONFIGDIR/servers.yml << EOF
cat >> $CONFIGDIR/remote-servers.yml << EOF
- name: '$SNAME'
host: localhost
port: 9000
@ -27,4 +43,4 @@ cat >> $CONFIGDIR/servers.yml << EOF
- collection
EOF
echo "New server added to $CONFIGDIR/servers.yml - please go change the settings"
echo "New server added to $CONFIGDIR/remote-servers.yml - please go change the settings"