mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(packaging): fixed issue with restart on upgrade in debian package, Fixes #2320
This commit is contained in:
parent
b891677ba5
commit
8daec7bde2
@ -5,14 +5,14 @@ set -e
|
||||
[ -f /etc/default/grafana-server ] && . /etc/default/grafana-server
|
||||
|
||||
startGrafana() {
|
||||
if [ -x /bin/systemctl ] ; then
|
||||
/bin/systemctl daemon-reload
|
||||
/bin/systemctl start grafana.service
|
||||
elif [ -x "/etc/init.d/grafana" ]; then
|
||||
if [ -x /bin/systemctl ]; then
|
||||
/bin/systemctl daemon-reload
|
||||
/bin/systemctl start grafana-server
|
||||
elif [ -x "/etc/init.d/grafana-server" ]; then
|
||||
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
|
||||
invoke-rc.d grafana start || true
|
||||
invoke-rc.d grafana-server start || true
|
||||
else
|
||||
/etc/init.d/grafana start || true
|
||||
/etc/init.d/grafana-server start || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -56,9 +56,9 @@ case "$1" in
|
||||
if [ -x /bin/systemctl ] ; then
|
||||
echo "### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd"
|
||||
echo " sudo /bin/systemctl daemon-reload"
|
||||
echo " sudo /bin/systemctl enable grafana-server.service"
|
||||
echo " sudo /bin/systemctl enable grafana-server"
|
||||
echo "### You can start grafana-server by executing"
|
||||
echo " sudo /bin/systemctl start grafana-server.service"
|
||||
echo " sudo /bin/systemctl start grafana-server"
|
||||
|
||||
elif [ -x /usr/sbin/update-rc.d ] ; then
|
||||
echo "### NOT starting grafana-server by default on bootup, please execute"
|
||||
|
Loading…
Reference in New Issue
Block a user