@cryptotaxi247 / netdata-1 / commits / aa42f9eec

Improve installation method for Alpine (#11035)

- the `python` package doesn't exist since Alpine 3.5 (dec 2016), use `python3` instead - create a proper start stript instead of using `/etc/local.d`

Sébastien Maccagnoni committed May 6, 2021 at 10:24 UTC aa42f9eecd2cfb6273ee296d67ee0e0544e620f7
1 file changed +13 -9
packaging/installer/methods/alpine.md
+13 -9
@@ -9,7 +9,7 @@ Execute these commands to install Netdata in Alpine Linux 3.x:
9
10 ```sh
11 # install required packages
12 -apk add alpine-sdk bash curl libuv-dev zlib-dev util-linux-dev libmnl-dev gcc make git autoconf automake pkgconfig python logrotate
12 +apk add alpine-sdk bash curl libuv-dev zlib-dev util-linux-dev libmnl-dev gcc make git autoconf automake pkgconfig python3 logrotate
13
14 # if you plan to run node.js Netdata plugins
15 apk add nodejs
@@ -21,16 +21,20 @@ cd netdata
21 # build it, install it, start it
22 ./netdata-installer.sh
23
24 -# make Netdata start at boot
25 -echo -e "#!/usr/bin/env bash\n/usr/sbin/netdata" >/etc/local.d/netdata.start
26 -chmod 755 /etc/local.d/netdata.start
24 +# make Netdata start at boot and stop at shutdown
25 +cat > /etc/init.d/netdata << EOF
26 +#!/sbin/openrc-run
27
28 -# make Netdata stop at shutdown
29 -echo -e "#!/usr/bin/env bash\nkillall netdata" >/etc/local.d/netdata.stop
30 -chmod 755 /etc/local.d/netdata.stop
28 +name="netdata"
29 +command="/usr/sbin/$SVCNAME"
30
32 -# enable the local service to start automatically
33 -rc-update add local
31 +depend() {
32 + need net localmount
33 + after firewall
34 +}
35 +EOF
36 ```
37
38 +If you have installed Netdata in another directory, you have to change the content of the `command` variable in that script.
39 +
40 [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fpackaging%2Finstaller%2Fmethods%2Falpine&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)