pkgsrc-Changes archive

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

CVS commit: pkgsrc/www/tinyproxy/files



Module Name:    pkgsrc
Committed By:   chuck
Date:           Wed Oct  7 19:33:33 UTC 2026

Modified Files:
        pkgsrc/www/tinyproxy/files: tinyproxy.sh

Log Message:
tinyproxy: have rc.d script create /var/run/tinyproxy if missing

Have the example tinyproxy rc.d script in files/tinyproxy.sh create
the pid directory (@VARBASE@/run/tinyproxy) if it is not present
using start_precmd (e.g. as is done in /etc/rc.d/mdnsd).  Needed
for cases where we reboot and /etc/rc.d/clearcritlocal deletes
the old pid directory from /var/run.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/www/tinyproxy/files/tinyproxy.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/tinyproxy/files/tinyproxy.sh
diff -u pkgsrc/www/tinyproxy/files/tinyproxy.sh:1.4 pkgsrc/www/tinyproxy/files/tinyproxy.sh:1.5
--- pkgsrc/www/tinyproxy/files/tinyproxy.sh:1.4 Fri Oct 12 13:57:46 2018
+++ pkgsrc/www/tinyproxy/files/tinyproxy.sh     Wed Oct  7 19:33:33 2026
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: tinyproxy.sh,v 1.4 2018/10/12 13:57:46 adam Exp $
+# $NetBSD: tinyproxy.sh,v 1.5 2026/10/07 19:33:33 chuck Exp $
 #
 
 # PROVIDE: tinyproxy
@@ -13,6 +13,15 @@ rcvar=$name
 command="@PREFIX@/bin/${name}"
 pidfile="@VARBASE@/run/tinyproxy/${name}.pid"
 required_files="@PKG_SYSCONFDIR@/${name}.conf"
+start_precmd="tinyproxy_precmd"
+
+tinyproxy_precmd()
+{
+    if [ ! -d @VARBASE@/run/tinyproxy ]; then
+        mkdir -p -m 755 @VARBASE@/run/tinyproxy
+    fi
+    chown @TINYPROXY_USER@:@TINYPROXY_GROUP@ @VARBASE@/run/tinyproxy
+}
 
 load_rc_config $name
 run_rc_command "$1"



Home | Main Index | Thread Index | Old Index