[30399] trunk/dports/net/nedi

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 26 09:47:36 PDT 2007


Revision: 30399
          http://trac.macosforge.org/projects/macports/changeset/30399
Author:   markd at macports.org
Date:     2007-10-26 09:47:36 -0700 (Fri, 26 Oct 2007)

Log Message:
-----------
After getting schooled in the ways if StartupItems, use the preferred startupItem.executable.

Modified Paths:
--------------
    trunk/dports/net/nedi/Portfile
    trunk/dports/net/nedi/files/org.macports.nedisyslog.plist

Removed Paths:
-------------
    trunk/dports/net/nedi/files/nedisyslog.wrapper

Modified: trunk/dports/net/nedi/Portfile
===================================================================
--- trunk/dports/net/nedi/Portfile	2007-10-26 16:01:47 UTC (rev 30398)
+++ trunk/dports/net/nedi/Portfile	2007-10-26 16:47:36 UTC (rev 30399)
@@ -4,7 +4,7 @@
 
 name			nedi
 version			1.0.w
-revision		9
+revision		10
 categories		net
 maintainers		markd
 platforms		darwin
@@ -43,14 +43,10 @@
 
 # Set some useful variables
 set nedidir ${prefix}/share/
-set nedimonitorbin ${nedidir}${name}/moni.pl
-set nedimonitorpid ${prefix}/var/run/${name}/nedimonitor.pid
 
 startupitem.create	yes
 startupitem.name	nedimonitor
-startupitem.pidfile	clean "${prefix}/var/run/${name}/nedimonitor.pid"
-startupitem.start	"${nedimonitorbin} & echo \$! > ${nedimonitorpid}"
-startupitem.stop	"/bin/kill \$(cat ${nedimonitorpid})"
+startupitem.executable	${prefix}/share/${name}/moni.pl
 
 use_configure		no
 patch {}
@@ -89,15 +85,11 @@
 # Create directory for rrd files
         xinstall -m 755 -d ${destroot}${prefix}/share/${name}/rrd
 
-# Create directory for the startupitem pid files
-	xinstall -m 755 -d ${destroot}${prefix}/var/run/${name}
-
 # Keep these empty directories
         destroot.keepdirs \
                 ${destroot}${prefix}/share/${name}/db/cfg \
 		${destroot}${prefix}/share/${name}/html/log \
-		${destroot}${prefix}/share/${name}/rrd \
-		${destroot}${prefix}/var/run/${name}
+		${destroot}${prefix}/share/${name}/rrd
 
 # Rename nedi.conf to nedi.conf.sample so port upgrades don't overwrite an installed nedi.conf
 # Also set permissions on nedi.conf because it has passwords.
@@ -107,14 +99,12 @@
 }
 
 pre-install {
-# MacPorts can only create one startupitem per portfile.  So copy nedisyslog.plist and
-# snmptrapd.plist from filespath and copy and link it as startupitem's do.
+# MacPorts can create only one startupitem per portfile.  So copy nedisyslog.plist and
+# snmptrapd.plist from filespath and link them into /Library/LaunchDaemons as startupitem's do.
 
 	xinstall -m 755 -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
 	xinstall -m 755 ${filespath}/org.macports.nedisyslog.plist \
 		${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
-	xinstall -m 755 ${filespath}/nedisyslog.wrapper \
-		${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
 	system "cd /Library/LaunchDaemons && ln -sf \
 		${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/org.macports.nedisyslog.plist"
 

Deleted: trunk/dports/net/nedi/files/nedisyslog.wrapper
===================================================================
--- trunk/dports/net/nedi/files/nedisyslog.wrapper	2007-10-26 16:01:47 UTC (rev 30398)
+++ trunk/dports/net/nedi/files/nedisyslog.wrapper	2007-10-26 16:47:36 UTC (rev 30399)
@@ -1,52 +0,0 @@
-#!/bin/sh
-#
-# MacPorts generated daemondo support script
-#
-
-#
-# Init
-#
-prefix=__PREFIX__
-
-#
-# Start
-#
-Start()
-{
-        __PREFIX__/share/nedi/syslog.pl & echo $! > __PREFIX__/var/run/nedi/nedisyslog.pid
-}
-
-#
-# Stop
-#
-Stop()
-{
-        /bin/kill $(cat __PREFIX__/var/run/nedi/nedisyslog.pid)
-}
-
-#
-# Restart
-#
-Restart()
-{
-        Stop
-        Start
-}
-
-#
-# Run
-#
-Run()
-{
-case $1 in
-  start  ) Start   ;;
-  stop   ) Stop    ;;
-  restart) Restart ;;
-  *      ) echo "$0: unknown argument: $1";;
-esac
-}
-
-#
-# Run a phase based on the selector
-#
-Run $1

Modified: trunk/dports/net/nedi/files/org.macports.nedisyslog.plist
===================================================================
--- trunk/dports/net/nedi/files/org.macports.nedisyslog.plist	2007-10-26 16:01:47 UTC (rev 30398)
+++ trunk/dports/net/nedi/files/org.macports.nedisyslog.plist	2007-10-26 16:47:36 UTC (rev 30399)
@@ -5,24 +5,12 @@
 <key>Label</key><string>org.macports.nedisyslog</string>
 <key>ProgramArguments</key>
 <array>
-                <string>__PREFIX__/bin/daemondo</string>
-                <string>--label=nedisyslog</string>
-                <string>--start-cmd</string>
-                <string>__PREFIX__/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
-                <string>start</string>
-                <string>;</string>
-                <string>--stop-cmd</string>
-                <string>__PREFIX__/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
-                <string>stop</string>
-                <string>;</string>
-                <string>--restart-cmd</string>
-                <string>__PREFIX__/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
-                <string>restart</string>
-                <string>;</string>
-                <string>--verbosity=1</string>
-                <string>--pid=fileclean</string>
-                <string>--pidfile</string>
-                <string>__PREFIX__/var/run/nedi/nedisyslog.pid</string>
+        <string>/opt/local/bin/daemondo</string>
+        <string>--label=nedisyslog</string>
+        <string>--start-cmd</string>
+        <string>/opt/local/share/nedi/syslog.pl</string>
+        <string>;</string>
+        <string>--pid=exec</string>
 </array>
 <key>Debug</key><false/>
 <key>Disabled</key><true/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071026/068d852b/attachment-0001.html


More information about the macports-changes mailing list