[127184] trunk/dports/multimedia/mythtv-core.27

ctreleaven at macports.org ctreleaven at macports.org
Wed Oct 22 07:57:59 PDT 2014


Revision: 127184
          https://trac.macports.org/changeset/127184
Author:   ctreleaven at macports.org
Date:     2014-10-22 07:57:59 -0700 (Wed, 22 Oct 2014)
Log Message:
-----------
mythtv-core.27: fixes for log rotation

Modified Paths:
--------------
    trunk/dports/multimedia/mythtv-core.27/Portfile
    trunk/dports/multimedia/mythtv-core.27/files/Myth_Stop_Start.applescript

Modified: trunk/dports/multimedia/mythtv-core.27/Portfile
===================================================================
--- trunk/dports/multimedia/mythtv-core.27/Portfile	2014-10-22 14:37:12 UTC (rev 127183)
+++ trunk/dports/multimedia/mythtv-core.27/Portfile	2014-10-22 14:57:59 UTC (rev 127184)
@@ -16,7 +16,7 @@
 
 name                mythtv-core${majorversion}
 version             0${majorversion}${minorversion}-Fixes-20141017
-revision            1
+revision            2
 categories          multimedia
 platforms           darwin
 # i386 unsupported -- https://trac.macports.org/ticket/40337

Modified: trunk/dports/multimedia/mythtv-core.27/files/Myth_Stop_Start.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.27/files/Myth_Stop_Start.applescript	2014-10-22 14:37:12 UTC (rev 127183)
+++ trunk/dports/multimedia/mythtv-core.27/files/Myth_Stop_Start.applescript	2014-10-22 14:57:59 UTC (rev 127184)
@@ -1,10 +1,7 @@
 (*  Applescript to stop/start Myth background apps
 For use with MacPorts install of Myth
 Author:  Craig Treleaven, ctreleaven at cogeco.ca
-Version: 0.27.0
-Modified: 2012Jul11 - new
-          2012Sep21 - log rotation
-          2013Sep25 - revert logserver stuff
+Version: 0.27.x
 
 NB - if mbe is running, we only stop it if it was launched under launchd
 *)
@@ -36,9 +33,9 @@
 		set mythbackend to " running."
 		set mythbackendButton to "Stop MythBackend"
 		try
-			do shell script "mythshutdown --check"
-		on error
-			set mythbackend to " running but busy with something.  Are you sure you want to shut down now?"
+			do shell script "@PREFIX@/bin/mythshutdown --status"
+		on error the error_message number the error_number
+			set mythbackend to " running but busy with something.  Are you sure you want to shut down now?  Status: " & error_number
 		end try
 	else
 		set mythbackend to " not running."
@@ -48,7 +45,7 @@
 	set myResult to display dialog newline & "Simple tool to start and stop Myth's background processes" & \xC2
 		newline & newline & newline & "Currently... " & \xC2
 		newline & newline & indent & "Log rotation " & rotatorStatus & \xC2
-		newline & newline & indent & "MySQL is" & mysqld & \xC2
+		newline & newline & indent & "Database (MySQL/MariaDB) is" & mysqld & \xC2
 		newline & newline & indent & "MythBackend is" & mythbackend & newline & newline \xC2
 		with icon note with title \xC2
 		"Stop/Start Myth-related programs" buttons {logrotButton, mythbackendButton, "Close"} \xC2
@@ -66,8 +63,11 @@
 		set myResult to "Close"
 	else if myResult contains "Schedule log rotation" then
 		--check for existence of 
-		if (FileExists("@PREFIX@/etc/logrotate.conf") and \xC2
-			FileExists("@PREFIX@/etc/logrotate.d/logrotate.mythtv")) then
+		if not FileExists("@PREFIX@/etc/logrotate.conf") then
+			do shell script "sudo cp @PREFIX@/share/logrotate/logrotate.conf.example @PREFIX@/etc/logrotate.conf" with administrator privileges
+		end if
+		if FileExists("@PREFIX@/etc/logrotate.d/logrotate.mythtv") then
+			display dialog "Missing logrotate.conf to be added" buttons {"Close"}
 			do shell script "sudo launchctl load -w /Library/LaunchDaemons/org.macports.logrotate.plist" with administrator privileges
 		else
 			display dialog "logrotate is not configured.  Please see http://www.mythtv.org/wiki/MacPorts for instructions." buttons {"Close"}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141022/32c99c6e/attachment.html>


More information about the macports-changes mailing list