File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8585mytemp=$( mktemp -d -p " ${RG_HOME} /tmp" -t " config.old.XXX" )
8686echo " $mytemp "
8787cp " ${RG_HOME} /config/config.json" " $mytemp "
88- cp " ${RG_HOME} /config/dashboard-settings.json" " $mytemp "
8988cp " ${RG_HOME} /config/snsConfig.json" " $mytemp "
9089cp " ${RG_HOME} /config/mongo-config.json" " $mytemp "
9190cp " ${RG_HOME} /config/global-config.json" " $mytemp "
Original file line number Diff line number Diff line change 22version=" 0.1.3"
33echo " Fixing secrets...(fixsecrets.sh v$version )"
44
5- [ -z $RG_HOME ] && RG_HOME=' /opt/deploy/sp2'
5+ [ -z " $RG_HOME " ] && RG_HOME=' /opt/deploy/sp2'
66echo " RG_HOME=$RG_HOME "
77
8- cd " $RG_HOME "
9- old_secrets=$( docker secret ls | grep -i sp2prod | awk ' {print $1}' )
8+ cd " $RG_HOME " || echo " Could not cd to $RG_HOME " && exit 1
9+ old_secrets=$( docker secret ls | grep -i sp2prod | awk ' {print $1}' )
1010if [ ! -z " $old_secrets " ]; then
11- echo " Found old secrets. Removing..."
12- docker secret rm $old_secrets
11+ echo " Found old secrets. Removing..."
12+ docker secret rm " $old_secrets "
1313fi
14- docker secret create sp2prod-dashboard-settings.json ./config/dashboard-settings.json
1514docker secret create sp2prod-config.json ./config/config.json
1615docker secret create sp2prod-alert-config.json ./config/alert-config.json
You can’t perform that action at this time.
0 commit comments