pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/grafana



Module Name:    pkgsrc
Committed By:   tnn
Date:           Fri Aug  2 13:23:52 UTC 2019

Modified Files:
        pkgsrc/www/grafana: Makefile
        pkgsrc/www/grafana/files: grafana.sh

Log Message:
grafana: fix rc.d script pidfile handling

>From Marc Baudoin.
Bump.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/www/grafana/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/www/grafana/files/grafana.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/grafana/Makefile
diff -u pkgsrc/www/grafana/Makefile:1.13 pkgsrc/www/grafana/Makefile:1.14
--- pkgsrc/www/grafana/Makefile:1.13    Thu Jun  6 16:09:19 2019
+++ pkgsrc/www/grafana/Makefile Fri Aug  2 13:23:51 2019
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2019/06/06 16:09:19 adam Exp $
+# $NetBSD: Makefile,v 1.14 2019/08/02 13:23:51 tnn Exp $
 
 DISTNAME=      grafana-6.2.2
+PKGREVISION=   1
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=grafana/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}

Index: pkgsrc/www/grafana/files/grafana.sh
diff -u pkgsrc/www/grafana/files/grafana.sh:1.3 pkgsrc/www/grafana/files/grafana.sh:1.4
--- pkgsrc/www/grafana/files/grafana.sh:1.3     Thu Jun  6 16:09:20 2019
+++ pkgsrc/www/grafana/files/grafana.sh Fri Aug  2 13:23:51 2019
@@ -16,6 +16,15 @@ grafana_home="@PREFIX@/share/${name}"
 pidfile="@VARBASE@/run/${name}.pid"
 command="@PREFIX@/bin/grafana-server"
 command_args="-homepath ${grafana_home} -config @PKG_SYSCONFDIR@/grafana.conf -pidfile ${pidfile} < /dev/null > /dev/null 2>&1 &"
+start_precmd="grafana_precmd"
+
+grafana_precmd() {
+       if [ ! -r "${pidfile}" ]; then
+               touch "${pidfile}"
+               chown "${grafana_user}:${grafana_group}" "${pidfile}"
+               chmod 644 "${pidfile}"
+       fi
+}
 
 if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
        load_rc_config $name
@@ -36,7 +45,7 @@ else
        stop)
                if [ -r "${pidfile}" ]; then
                        @ECHO@ "Stopping ${name}."
-                       kill `@CAT@ ${pidfile}` && @RM@ ${pidfile}
+                       kill `@CAT@ "${pidfile}"` && @RM@ "${pidfile}"
                fi
                ;;
        *)



Home | Main Index | Thread Index | Old Index