Skip to content

Commit

Permalink
added osx PackageMaker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Apr 23, 2013
1 parent 58f31a5 commit 8e7bc77
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
HelloNode/node_modules/grunt*
.DS_Store

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions macinstall/HelloNodePackageMaker.pmdoc/01hellonode.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<pkgref spec="1.12" uuid="13B8006E-DFEF-4682-8FA7-5B43A818BA08"><config><identifier>com.hurpdurp.helloNode.HelloNode.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/Users/aj/HelloNode/HelloNode</installFrom><installTo mod="true">/opt/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo.path</mod><mod>includeRoot</mod><mod>parent</mod><mod>installTo</mod><mod>relocatable</mod></config><contents><file-list>01hellonode-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
1 change: 1 addition & 0 deletions macinstall/HelloNodePackageMaker.pmdoc/02com-contents.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<pkg-contents spec="1.12"><f n="com.hurpdurp.apps.plist" o="root" g="staff" p="33188" pt="/Users/aj/HelloNode/macinstall/pkg/Payload.d/com.hurpdurp.apps.plist" m="false" t="file"/></pkg-contents>
1 change: 1 addition & 0 deletions macinstall/HelloNodePackageMaker.pmdoc/02com.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<pkgref spec="1.12" uuid="FF68A552-11F8-446E-B38E-2DEFBB209CA1"><config><identifier>com.hurpdurp.helloNode.com.hurpdurp.apps-1.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/aj/HelloNode/macinstall/pkg/Payload.d/com.hurpdurp.apps.plist</installFrom><installTo mod="true">/Library/LaunchDaemons/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo</mod><mod>installTo.path</mod><mod>parent</mod></config><scripts><scripts-dir mod="true">/Users/aj/HelloNode/macinstall/pkg/Scripts.d</scripts-dir></scripts><contents><file-list>02com-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
1 change: 1 addition & 0 deletions macinstall/HelloNodePackageMaker.pmdoc/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<pkmkdoc spec="1.12"><properties><title>Hello Node</title><build>/Users/aj/HelloNode/macinstall/Hello Node.pkg</build><organization>com.hurpdurp</organization><userSees ui="both"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>An example app for installing a NodeJS app as a system service</description><contents><choice title="HelloNode" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="true"><customLoc mod="true">/</customLoc><pkgref id="com.hurpdurp.helloNode.HelloNode.pkg"/></choice><choice title="com.hurpdurp.apps" id="choice2" starts_selected="true" starts_enabled="true" starts_hidden="true"><customLoc mod="true">/</customLoc><pkgref id="com.hurpdurp.helloNode.com.hurpdurp.apps-1.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"/></resources><flags/><item type="file">01hellonode.xml</item><item type="file">02com.xml</item><mod>properties.title</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>
13 changes: 12 additions & 1 deletion macinstall/pkg/Payload.d/com.hurpdurp.apps.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@
<string>com.hurpdurp.apps</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/lib/HelloNode/server.js</string>
<string>/usr/local/bin/node</string>
<string>/opt/HelloNode/bin/server.js</string>
</array>
<key>UserName</key>
<string>root</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>OnDemand</key>
<false/>
<!--
<key>StandardOutPath</key>
<string>/var/log/hellonode.info.log</string>
<key>StandardErrorPath</key>
<string>/var/log/hellonode.err.log</string>
<key>Debug</key>
<true/>
-->
</dict>
</plist>
8 changes: 8 additions & 0 deletions macinstall/pkg/Scripts.d/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@

launchctl unload -w /Library/LaunchDaemons/com.hurpdurp.apps.plist || true
launchctl load -w /Library/LaunchDaemons/com.hurpdurp.apps.plist

#launchctl submit \
# -l com.hurpdurp.apps \
# -o /var/logs/hellonode.info.log \
# -e /var/logs/hellonode.err.log \
# -- \
# /usr/local/bin/node \
# /opt/HelloNode/bin/server.js

0 comments on commit 8e7bc77

Please sign in to comment.