<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/c2fbb3d6136e632389a56642949b7216151c99e2">https://github.com/macports/macports-ports/commit/c2fbb3d6136e632389a56642949b7216151c99e2</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'>     new c2fbb3d6136 apcupsd: Prevent overwriting apcupsd.conf file
</span>c2fbb3d6136 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit c2fbb3d6136e632389a56642949b7216151c99e2
</span>Author: Stephen Reay <stephen@koalephant.com>
AuthorDate: Sun Jul 23 20:24:36 2023 +0700

<span style='display:block; white-space:pre;color:#404040;'>    apcupsd: Prevent overwriting apcupsd.conf file
</span>---
 sysutils/apcupsd/Portfile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/apcupsd/Portfile b/sysutils/apcupsd/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d475ca51d52..9811e4cc6e0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/apcupsd/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/apcupsd/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,6 +4,7 @@ PortSystem                  1.0
</span> 
 name                        apcupsd
 version                     3.14.14
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision                    1
</span> categories                  sysutils
 license                     GPL-2
 maintainers                 {@stephenreay koalephant.com:stephen} openmaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -32,6 +33,18 @@ startupitem.install         yes
</span> startupitem.custom_file     ${worksrcpath}/platforms/darwin/org.apcupsd.apcupsd.plist
 startupitem.type            launchd
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # Move conf file to sample so it does not get overwritten
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    file rename ${destroot}${prefix}/etc/apcupsd/apcupsd.conf ${destroot}${prefix}/etc/apcupsd/apcupsd.conf.sample
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-activate {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # Create initial conf file if needed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {![file exists ${prefix}/etc/apcupsd/apcupsd.conf]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        file copy ${prefix}/etc/apcupsd/apcupsd.conf.sample ${prefix}/etc/apcupsd/apcupsd.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> 
 variant usb description {Add USB support} {
     configure.args-replace  --disable-usb --enable-usb
</pre><pre style='margin:0'>

</pre>