style: NEZ-2138 rpm 版本升级日志调整

This commit is contained in:
shizhendong
2023-04-26 17:39:53 +08:00
parent a81ebe861f
commit 5f7d1942ed
2 changed files with 9 additions and 5 deletions

View File

@@ -136,8 +136,10 @@ if [ 2 -eq $1 ];then
restoreComponentConfig $PROMTAIL_PATH $TMP_PATH/promtail
# telegraf config
restoreComponentConfig $TELEGRAF_PATH $TMP_PATH/telegraf
restoreComponentConfig $TELEGRAF_PATH/telegraf.d $TMP_PATH/telegraf/telegraf.d
if [ -d $TELEGRAF_PATH ];then
restoreComponentConfig $TELEGRAF_PATH $TMP_PATH/telegraf
restoreComponentConfig $TELEGRAF_PATH/telegraf.d $TMP_PATH/telegraf/telegraf.d
fi
fi
systemctl restart nz-talon
@@ -145,7 +147,6 @@ if [ 2 -eq $1 ];then
if service_exists nz-promtail; then
systemctl restart nz-promtail
else
echo 'service nz-promtail not exists,add this service'
cat > /usr/lib/systemd/system/nz-promtail.service <<"EOF"
[Unit]
Description=nz-talon

View File

@@ -22,11 +22,14 @@ if [ 2 -eq $1 ];then
fi
systemctl stop nz-talon
systemctl stop nz-telegraf
# nz-telegraf.service
if service_exists nz-telegraf; then
systemctl stop nz-telegraf
fi
# promtail.service, deprecated
if service_exists promtail; then
echo 'service promtail exists, close the service'
systemctl stop promtail
systemctl disable promtail
rm /usr/lib/systemd/system/promtail.service