From: Tilghman Lesher Date: Mon, 15 Mar 2010 01:37:44 +0000 (+0000) Subject: Merged revisions 252362 via svnmerge from X-Git-Tag: 1.6.0.27-rc1~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c574788af05768e361efb25736f9efd57f1f7af;p=thirdparty%2Fasterisk.git Merged revisions 252362 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r252362 | tilghman | 2010-03-14 20:37:04 -0500 (Sun, 14 Mar 2010) | 11 lines Merged revisions 252361 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r252361 | tilghman | 2010-03-14 20:33:50 -0500 (Sun, 14 Mar 2010) | 4 lines Launch Asterisk on Mac OS X with launchd. Reviewboard: https://reviewboard.asterisk.org/r/551/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@252363 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/Makefile b/Makefile index e51288c721..66047b1f58 100644 --- a/Makefile +++ b/Makefile @@ -786,6 +786,8 @@ config: 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/LaunchDaemons/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 \ diff --git a/contrib/init.d/org.asterisk.asterisk.plist b/contrib/init.d/org.asterisk.asterisk.plist new file mode 100644 index 0000000000..a0c87e8359 --- /dev/null +++ b/contrib/init.d/org.asterisk.asterisk.plist @@ -0,0 +1,47 @@ + + + + + Label + org.asterisk.asterisk.launchagent + Disabled + + UserName + asterisk + GroupName + asterisk + OnDemand + + KeepAlive + + RunAtLoad + + Umask + 432 + Program + /usr/local/sbin/asterisk + ProgramArguments + + /usr/local/sbin/asterisk + -f + + EnvironmentVariables + + TERM + xterm-color + + SoftResourceLimits + + NumberOfFiles + 1024 + Core + 0 + + StandardInPath + /dev/null + StandardOutPath + /dev/null + StandardErrorPath + /dev/null + + diff --git a/main/asterisk.c b/main/asterisk.c index 74bd91198b..5adc7db55c 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3303,7 +3303,7 @@ int main(int argc, char *argv[]) } 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