Update linux.sh

This commit is contained in:
dami
2025-08-02 14:37:48 +08:00
parent 9010c71051
commit 6b92ecebf9
+4 -5
View File
@@ -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
}