style: NEZ-2138 rpm 版本升级日志调整
This commit is contained in:
@@ -136,16 +136,17 @@ if [ 2 -eq $1 ];then
|
|||||||
restoreComponentConfig $PROMTAIL_PATH $TMP_PATH/promtail
|
restoreComponentConfig $PROMTAIL_PATH $TMP_PATH/promtail
|
||||||
|
|
||||||
# telegraf config
|
# telegraf config
|
||||||
|
if [ -d $TELEGRAF_PATH ];then
|
||||||
restoreComponentConfig $TELEGRAF_PATH $TMP_PATH/telegraf
|
restoreComponentConfig $TELEGRAF_PATH $TMP_PATH/telegraf
|
||||||
restoreComponentConfig $TELEGRAF_PATH/telegraf.d $TMP_PATH/telegraf/telegraf.d
|
restoreComponentConfig $TELEGRAF_PATH/telegraf.d $TMP_PATH/telegraf/telegraf.d
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
systemctl restart nz-talon
|
systemctl restart nz-talon
|
||||||
|
|
||||||
# nz-promtail.service
|
# nz-promtail.service
|
||||||
if service_exists nz-promtail; then
|
if service_exists nz-promtail; then
|
||||||
systemctl restart nz-promtail
|
systemctl restart nz-promtail
|
||||||
else
|
else
|
||||||
echo 'service nz-promtail not exists,add this service'
|
|
||||||
cat > /usr/lib/systemd/system/nz-promtail.service <<"EOF"
|
cat > /usr/lib/systemd/system/nz-promtail.service <<"EOF"
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=nz-talon
|
Description=nz-talon
|
||||||
|
|||||||
@@ -22,11 +22,14 @@ if [ 2 -eq $1 ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl stop nz-talon
|
systemctl stop nz-talon
|
||||||
|
|
||||||
|
# nz-telegraf.service
|
||||||
|
if service_exists nz-telegraf; then
|
||||||
systemctl stop nz-telegraf
|
systemctl stop nz-telegraf
|
||||||
|
fi
|
||||||
|
|
||||||
# promtail.service, deprecated
|
# promtail.service, deprecated
|
||||||
if service_exists promtail; then
|
if service_exists promtail; then
|
||||||
echo 'service promtail exists, close the service'
|
|
||||||
systemctl stop promtail
|
systemctl stop promtail
|
||||||
systemctl disable promtail
|
systemctl disable promtail
|
||||||
rm /usr/lib/systemd/system/promtail.service
|
rm /usr/lib/systemd/system/promtail.service
|
||||||
|
|||||||
Reference in New Issue
Block a user