diff --git a/plugins/loki/versions/3.5.3/linux.sh b/plugins/loki/versions/3.5.3/linux.sh index fb53d23f8..ed529db77 100644 --- a/plugins/loki/versions/3.5.3/linux.sh +++ b/plugins/loki/versions/3.5.3/linux.sh @@ -35,6 +35,7 @@ Install_App() InstallDir=$serverPath/loki mkdir -p ${SourceDir} mkdir -p ${InstallDir} + mkdir -p ${InstallDir}/bin if [ ! -f ${SourceDir}/${FILE_TGZ} ];then wget --no-check-certificate -O ${SourceDir}/${FILE_TGZ} https://github.com/grafana/loki/releases/download/v${VERSION}/${FILE_TGZ} @@ -46,16 +47,14 @@ Install_App() if [ ! -d $InstallDir/bin/loki ];then cd ${SourceDir} && unzip ${PT_FILE_TGZ} - mkdir -p $InstallDir/data/{chunks,rules,boltdb-shipper-active,boltdb-shipper-cache} - mkdir -p $InstallDir/bin - cp -rf ./loki-linux-${ARCH_NAME} $InstallDir/bin/loki + mkdir -p ${InstallDir}/data/{chunks,rules,boltdb-shipper-active,boltdb-shipper-cache} + cp -rf ./loki-linux-${ARCH_NAME} ${InstallDir}/bin/loki rm -rf ./loki-linux-${ARCH_NAME} fi if [ ! -d $InstallDir/bin/promtail ];then cd ${SourceDir} && unzip ${PT_FILE_TGZ} - mkdir -p $InstallDir/bin - cp -rf ./promtail-linux-${ARCH_NAME} $InstallDir/bin/promtail + cp -rf ./promtail-linux-${ARCH_NAME} ${InstallDir}/bin/promtail rm -rf ./promtail-linux-${ARCH_NAME} fi }