Skip to content

Commit

Permalink
Refs: skycoin#171 Fixing a services restart in wrong place that spoil…
Browse files Browse the repository at this point in the history
…s the manager IP update
  • Loading branch information
stdevPavelmc committed Nov 24, 2018
1 parent 27e247e commit 8e7063a
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions static/script/upgrade/one_time_upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -811,24 +811,6 @@ function upgrade_skywire() {
RESULT="no"
fi

# restart services
log "Starting services on $node"
if [ "$node" == "$MANAGER_IP" ] ; then
# start node
ssh "root@${node}" "systemctl start skywire-manager && systemctl status skywire-manager" 2>&1 | tee -a $LOG
exitstatus=$?
else
# start node
ssh "root@${node}" "systemctl start skywire-node && systemctl status skywire-node" 2>&1 | tee -a $LOG
exitstatus=$?
fi

if [ $exitstatus -ne 0 ] ; then
dialog_host_stop_next "${node}" "Upgrading skywire - starting services" \
"Start of services on node $node failed."
RESULT="no"
fi

# verify result
if [ "$RESULT" == "yes" ] ; then
# log
Expand Down Expand Up @@ -966,12 +948,12 @@ function start_apps() {
# starting manager on node
log "Starting manager on node $node"

ssh "root@${node}" "systemctl restart skywire-manager && systemctl status skywire-manager 2>&1" | tee -a $LOG
ssh "root@${node}" "systemctl restart skywire-manager 2>&1 && systemctl status skywire-manager 2>&1" | tee -a $LOG
else
# starting node
log "Starting node on $node"

ssh "root@${node}" "systemctl restart skywire-node && systemctl status skywire-node" | tee -a $LOG
ssh "root@${node}" "systemctl restart skywire-node 2>&1 && systemctl status skywire-node 2>&1" | tee -a $LOG
fi
fi
done
Expand Down

0 comments on commit 8e7063a

Please sign in to comment.