mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
packaging: fixed issue with pid file on systemd systems, fixes #9133
This commit is contained in:
@@ -6,6 +6,7 @@ set -e
|
||||
|
||||
IS_UPGRADE=false
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
[ -z "$GRAFANA_USER" ] && GRAFANA_USER="grafana"
|
||||
@@ -41,6 +42,12 @@ case "$1" in
|
||||
IS_UPGRADE=true
|
||||
fi
|
||||
|
||||
# make sure there is a /var/run/grafana dir on systemd systems
|
||||
if [ -x /bin/systemctl ] ; then
|
||||
mkdir -p $PID_FILE_DIR
|
||||
chown -R $GRAFANA_USER:$GRAFANA_GROUP $PID_FILE_DIR
|
||||
fi
|
||||
|
||||
if [ "x$IS_UPGRADE" != "xtrue" ]; then
|
||||
if command -v systemctl >/dev/null; then
|
||||
echo "### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd"
|
||||
|
||||
Reference in New Issue
Block a user