mirage/ocaml-launchd

Name: ocaml-launchd

Owner: MirageOS

Description: This library is useful if you wish to make a service which is automatically started by launchd.

Created: 2015-10-09 13:12:22.0

Updated: 2017-06-05 20:35:26.0

Pushed: 2016-01-14 11:56:36.0

Homepage: null

Size: 114

Language: OCaml

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OCaml bindings to the launchd API

This library is useful if you wish to make a service which is automatically started by launchd.

Please read the Unix API documentation (and the Lwt_unix version).

Example

First build the code


Assuming you are running under OS X, install the example services as LaunchAgents for the current user:

install-example.sh

Check the agents have registered:

unchctl list | grep org.recoil
7   0   org.recoil.dave.anotherd
0   org.recoil.dave.exampled

One of them is listening on port 8081:

lnet localhost 8081
ng ::1...
et: connect to address ::1: Connection refused
ng 127.0.0.1...
ected to localhost.
pe character is '^]'.
o there!
ection closed by foreign host.

And the other is listening on a Unix domain socket:

 -l /var/run/org.recoil*
rw-rw-  1 djs  staff  0  9 Oct 14:06 /var/run/org.recoil.dave.exampled

Run this script to remove the agents:

uninstall-example.sh

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.