Closed TonyLeeVT closed 5 years ago
Is a '//' bad?
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. :-)
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.
No worries, it saved me a bunch of time.
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 &