[asterisk-commits] tilghman: branch 1.4 r252361 - in /branches/1.4: ./ contrib/init.d/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Mar 14 20:33:54 CDT 2010


Author: tilghman
Date: Sun Mar 14 20:33:50 2010
New Revision: 252361

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=252361
Log:
Launch Asterisk on Mac OS X with launchd.

Reviewboard: https://reviewboard.asterisk.org/r/551/

Added:
    branches/1.4/contrib/init.d/org.asterisk.asterisk.plist   (with props)
Modified:
    branches/1.4/Makefile
    branches/1.4/main/asterisk.c

Modified: branches/1.4/Makefile
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/Makefile?view=diff&rev=252361&r1=252360&r2=252361
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Sun Mar 14 20:33:50 2010
@@ -691,6 +691,8 @@
 		elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \
 			$(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk $(DESTDIR)/etc/init.d/asterisk; \
 			if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
+		elif [ -d $(DESTDIR)/Library/LaunchDaemons -a ! -f $(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist ]; then \
+			$(INSTALL) -m 644 contrib/init.d/org.asterisk.asterisk.plist $(DESTDIR)/Library/LaunchAgents/org.asterisk.asterisk.plist; \
 		elif [ -f /etc/slackware-version ]; then \
 			echo "Slackware is not currently supported, although an init script does exist for it."; \
 		else \

Added: branches/1.4/contrib/init.d/org.asterisk.asterisk.plist
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/contrib/init.d/org.asterisk.asterisk.plist?view=auto&rev=252361
==============================================================================
--- branches/1.4/contrib/init.d/org.asterisk.asterisk.plist (added)
+++ branches/1.4/contrib/init.d/org.asterisk.asterisk.plist Sun Mar 14 20:33:50 2010
@@ -1,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>Label</key>
+	<string>org.asterisk.asterisk.launchagent</string>
+	<key>Disabled</key>
+	<false/><!-- Change this to '<true/>' to disable Asterisk -->
+	<key>UserName</key>
+	<string>asterisk</string>
+	<key>GroupName</key>
+	<string>asterisk</string>
+	<key>OnDemand</key><!-- For 10.4 (deprecated in 10.5 and above) -->
+	<false/>
+	<key>KeepAlive</key><!-- For 10.5 and above -->
+	<true/>
+	<key>RunAtLoad</key>
+	<true/>
+	<key>Umask</key>
+	<integer>432</integer><!-- 0660 -->
+	<key>Program</key>
+	<string>/usr/local/sbin/asterisk</string>
+	<key>ProgramArguments</key>
+	<array>
+		<string>/usr/local/sbin/asterisk</string>
+		<string>-f</string><!-- Don't fork.  This option is mandatory when running with launchd. -->
+	</array>
+	<key>EnvironmentVariables</key>
+	<dict>
+		<key>TERM</key>
+		<string>xterm-color</string>
+	</dict>
+	<key>SoftResourceLimits</key>
+	<dict>
+		<key>NumberOfFiles</key>
+		<integer>1024</integer>
+		<key>Core</key>
+		<integer>0</integer>
+	</dict>
+	<key>StandardInPath</key>
+	<string>/dev/null</string>
+	<key>StandardOutPath</key>
+	<string>/dev/null</string>
+	<key>StandardErrorPath</key>
+	<string>/dev/null</string>
+</dict>
+</plist>

Propchange: branches/1.4/contrib/init.d/org.asterisk.asterisk.plist
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: branches/1.4/contrib/init.d/org.asterisk.asterisk.plist
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yotta

Propchange: branches/1.4/contrib/init.d/org.asterisk.asterisk.plist
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: branches/1.4/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=252361&r1=252360&r2=252361
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Sun Mar 14 20:33:50 2010
@@ -3030,7 +3030,7 @@
 		} else
 			ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", ast_config_AST_PID, strerror(errno));
 #else
-		ast_log(LOG_WARNING, "Mac OS X detected.  Use '/sbin/launchd -d' to launch with the nofork option.\n");
+		ast_log(LOG_WARNING, "Mac OS X detected.  Use 'launchctl load /Library/LaunchDaemon/org.asterisk.asterisk.plist'.\n");
 #endif
 	}
 #endif




More information about the asterisk-commits mailing list