-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.sh
29 lines (19 loc) · 870 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
### Set up NodePKI-Client
echo ">>>>>> Setting up NodePKI-Client ..."
cd /opt/nodepki/nodepki-client
mkdir data/config
cp config.default.yml data/config/config.yml
sed -e "s/api_username/$API_USERNAME/" data/config/config.yml > data/config/config.yml.tmp && mv data/config/config.yml.tmp data/config/config.yml
sed -e "s/api_password/$API_PASSWORD/" data/config/config.yml > data/config/config.yml.tmp && mv data/config/config.yml.tmp data/config/config.yml
echo ">>>>>> Setting up NodePKI-Webclient ..."
cd /opt/nodepki/nodepki-webclient
mkdir data/config
cp config.default.yml data/config/config.yml
### Set up NodePKI
echo ">>>>>> Setting up NodePKI ..."
cd /opt/nodepki/nodepki
mkdir data/config
cp config.default.yml data/config/config.yml
node nodepkictl useradd --username $API_USERNAME --password $API_PASSWORD
echo ">>>>>> Setup finished."