On a package upgrade, restart telegraf.
This commit is contained in:
parent
7cc60dfb8f
commit
0000ecb0f7
|
@ -169,6 +169,11 @@ if which systemctl > /dev/null 2>&1 ; then
|
||||||
/lib/systemd/system/telegraf.service
|
/lib/systemd/system/telegraf.service
|
||||||
systemctl enable telegraf
|
systemctl enable telegraf
|
||||||
|
|
||||||
|
# restart on upgrade of package
|
||||||
|
if [ "$#" -eq 2 ]; then
|
||||||
|
systemctl restart telegraf
|
||||||
|
fi
|
||||||
|
|
||||||
# Sysv
|
# Sysv
|
||||||
else
|
else
|
||||||
ln -sfn $INSTALL_ROOT_DIR/versions/$version/scripts/init.sh \
|
ln -sfn $INSTALL_ROOT_DIR/versions/$version/scripts/init.sh \
|
||||||
|
@ -185,6 +190,11 @@ else
|
||||||
chkconfig --add telegraf
|
chkconfig --add telegraf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# restart on upgrade of package
|
||||||
|
if [ "$#" -eq 2 ]; then
|
||||||
|
/etc/init.d/telegraf restart
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p $TELEGRAF_LOG_DIR
|
mkdir -p $TELEGRAF_LOG_DIR
|
||||||
chown -R -L telegraf:telegraf $TELEGRAF_LOG_DIR
|
chown -R -L telegraf:telegraf $TELEGRAF_LOG_DIR
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue