deeso / fleet-deployment

Apache License 2.0
15 stars 4 forks source link

Double forward slash (//) from fleet-run.sh #2

Closed TonyLeeVT closed 5 years ago

TonyLeeVT commented 5 years ago

The BASE variable ends in a slash (/) and the CONF variable begins with a slash.

This causes a double slash such as the following (look between fleet and conf):

CGroup: /system.slice/fleet-service.service └─19903 /usr/bin/fleet serve --config /opt/fleet//conf/fleet.yaml

cat fleet-run.sh

!/bin/bash

FLEETBIN=/usr/bin/fleet BASE=/opt/fleet/ CONF=$BASE/conf CONF_FILE=$CONF/fleet.yaml INIT_FILE=$BASE/fleet.initted

PREPARE_FLEET="$FLEETBIN prepare db --config $CONF_FILE" SERVE_FLEET="$FLEETBIN serve --config $CONF_FILE"

if [ ! -f $INIT_FILE ]; then echo "Initializiing fleet" touch $INIT_FILE $PREPARE_FLEET fi

echo "Starting fleet: $SERVE_FLEET" $SERVE_FLEET &

deeso commented 5 years ago

Is a '//' bad?

TonyLeeVT commented 5 years ago

I don't believe it will kill anything. Just something I noticed in the script and service status output. Feel free to correct or ignore. :-)

deeso commented 5 years ago

Understood. I hacked this together over a few days to get it working, and I have not used it for nearly a year. I appreciate the checks.

TonyLeeVT commented 5 years ago

No worries, it saved me a bunch of time.