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

55 lines
1.0 KiB
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
2017-03-31 11:35:43 +02:00
discovery_path: /services/discovery
inbox_path: /services/inbox
2017-03-30 17:31:50 +02:00
use_https: False
taxii_version: '1.1'
headers:
auth:
2017-03-31 11:35:43 +02:00
username: test
password: test
collections:
- collection
2017-03-30 17:31:50 +02:00
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:
2017-04-07 11:22:05 +02:00
cacert_path:
cert_file:
key_file:
key_password:
jwt_auth_url:
verify_ssl: True
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"