Add time in net/logs path (#6701)

This commit is contained in:
sakridge 2019-11-06 10:43:12 -08:00 committed by GitHub
parent 18f146ace5
commit ec50c20400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -12,8 +12,14 @@ netDir=$(
echo "$PWD"
)
netConfigDir="$netDir"/config
netLogDateDir="$netDir"/log-$(date +"%Y-%m-%d_%H_%M_%S")
netLogDir="$netDir"/log
mkdir -p "$netConfigDir" "$netLogDir"
if [[ -d $netLogDir && ! -L $netLogDir ]]; then
echo "Warning: moving $netLogDir to make way for symlink."
mv "$netLogDir" "$netDir"/log.old
fi
mkdir -p "$netConfigDir" "$netLogDateDir"
ln -sf "$netLogDateDir" "$netLogDir"
SOLANA_ROOT="$netDir"/..
# shellcheck source=scripts/configure-metrics.sh