MISP-Taxii-Server/scripts/install-remote-server.sh

47 lines
874 B
Bash
Raw Normal View History

2017-03-30 14:56:25 +02:00
HOMEDIR=~
CONFIGDIR=$HOMEDIR/.misptaxii
echo "[MISP-TAXII-SERVER]"
echo "POLLING SERVER INSTALLATION"
if [ ! -d $CONFIGDIR ]; then
echo "Creating config directory at $CONFIGDIR"
mkdir -p $CONFIGDIR;
fi
2017-03-30 17:31:50 +02:00
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
2017-03-30 14:56:25 +02:00
echo "FRIENDLY SERVER NAME:"
read SNAME
2017-03-30 17:31:50 +02:00
cat >> $CONFIGDIR/remote-servers.yml << EOF
2017-03-30 17:26:46 +02:00
- name: '$SNAME'
2017-03-30 14:56:25 +02:00
host: localhost
port: 9000
2017-03-30 14:57:36 +02:00
discovery_path:
2017-03-30 14:56:25 +02:00
use_https: False
2017-03-30 17:26:46 +02:00
taxii_version: '1.1'
2017-03-30 14:57:36 +02:00
headers:
2017-03-30 17:26:46 +02:00
auth:
username:
password:
collections:
- collection
2017-03-30 15:52:38 +02:00
EOF
2017-03-30 17:31:50 +02:00
echo "New server added to $CONFIGDIR/remote-servers.yml - please go change the settings"