diff options
author | Peter Lemenkov <lemenkov@gmail.com> | 2016-07-02 19:39:48 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-02 19:39:48 +0400 |
commit | fcd8a19b03b42f0b32808efcccc4fee78d3d3da6 (patch) | |
tree | ab4fcd1ea1a86a5fc5f9e77173409d4d393a9652 | |
parent | 891bc6de32f70975888b985a17b01ddd33018115 (diff) | |
parent | 8bb8f84c7c222ee3cced4fcd89f0ad6a1811bfb8 (diff) | |
download | erlang-sd_notify-fcd8a19b03b42f0b32808efcccc4fee78d3d3da6.tar.gz |
Merge pull request #11 from systemd/erlang-sd_notify-readme
Readme updated
-rw-r--r-- | README.md | 84 |
1 files changed, 45 insertions, 39 deletions
@@ -1,54 +1,60 @@ -`sd_notify` Erlang interface for Centos 7 and Debian ---- -This adds the `sd_notify` to the Centos erlang package. -Tested it starting for zero-dependencies RabbitMQ package ([github](https://github.com/rabbitmq/erlang-rpm) - [binany](https://www.rabbitmq.com/releases/erlang/) ) +Erlang systemd-notify +=============== +Erlang module for native access to the `systemd-notify` facilities. -Build from source `RPM` -- +Build status: [![Build Status](https://travis-ci.org/systemd/erlang-sd_notify.svg?branch=master)](https://travis-ci.org/systemd/erlang-sd_notify) - 1. `docker build -t sd_rpm .` - 2. `make` - +Installation +============ - -Download the binary -- -https://github.com/systemd/erlang-sd_notify/releases +On Fedora/CentOS + +```bash + extract the tar.gz + mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/priv/ + mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ + cp priv/* /usr/lib64/erlang/lib/sd_notify-0.10/priv/ + cp ebin/* /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ +``` -Install and Test -- -Install: +On Debian/Ubuntu - extract the tar.gz - mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/priv/ - mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ - cp priv/* /usr/lib64/erlang/lib/sd_notify-0.10/priv/ - cp ebin/* /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ - +```bash + dpkg -i erlang-sd-notify_0.10-1_amd64.deb +``` + +Build from source using Docker +=== -Test: +On Ubuntu - [root@a499ee66251a]# erl - ... - 1> sd_notify:sd_notify(0,"READY=1"). - ok +```bash + docker build -t build_ubuntu docker/ubuntu/ + docker run -v {sd_notify_dir}:/sd/ build_ubuntu /bin/sh -c "cd /sd/; make deb" +``` + +on Centos +```bash + docker build -t build_centos docker/centos/ + docker run -v {sd_notify_dir}:/sd/ build_centos /bin/sh -c "cd /sd/; make all" +``` -Building on Debian -- -Install the pre-requisites to the build: - sudo apt-get install build-essential devscripts fakeroot \ - debhelper erlang-dev libsystemd-dev erlang-eunit +Download Binaries +=== +[Github Repository](https://github.com/systemd/erlang-sd_notify/releases) -Make the package: +Usage +===== - make deb +Quick example: -Install and test: +```bash + [root@a499ee66251a]# erl + ... + 1> sd_notify:sd_notify(0,"READY=1"). + 0 +``` - sudo dpkg -i deb-build/erlang-sd-notify_0.9-1_amd64.deb - erl - 1> sd_notify:sd_notify(0,"READY=1"). - ok |