blob: 1ce14d966868fafe787c8c8ce4e96c9d66898e96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
`sd_notify` Erlang interface for Centos 7 and Debian
---
This adds the `sd_notify` to the Centos erlang package.
I tested it starting for zero-dependencies RabbitMQ package ([github](https://github.com/rabbitmq/erlang-rpm) - [binany](https://www.rabbitmq.com/releases/erlang/) )
Build from source
-
To build it execute the docker image.
Download the binary
-
https://github.com/Gsantomaggio/erlang-sd_notify/releases/tag/0.9
Add to Erlang
-
I suppose you are using the [RabbitMQ Erlang installation].(https://www.rabbitmq.com/releases/erlang/)
Follow these steps:
extract the tar.gz
mkdir -p /usr/lib64/erlang/lib/sd_notify-0.9/priv/
mkdir -p /usr/lib64/erlang/lib/sd_notify-0.9/ebin/
cp priv/* /usr/lib64/erlang/lib/sd_notify-0.9/priv/
cp ebin/* /usr/lib64/erlang/lib/sd_notify-0.9/ebin/
Test
-
To test it use: `sd_notify:sd_notify(0,"READY=1")`, in this way:
[root@a499ee66251a]# erl
...
1> sd_notify:sd_notify(0,"READY=1").
ok
RabbitMQ notes:
-
RabbitMQ does not need `sd_notify`,.
This add the feature for the users that in general need `sd_notify`.
The integration should be considerer as **experimental**
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
Make the package:
make deb
Install and test:
sudo dpkg -i deb-build/erlang-sd-notify_0.9-1_amd64.deb
erl
1> sd_notify:sd_notify(0,"READY=1").
ok
|