Fix devuan support for initd (#6275)
* netdata/packaging: Support Devuan OS release - allow init.d installation for this distro * netdata/packaging: Cleanup netdata-lsb scriptlet 1) Dont depend on services we may or may NOT have available for monitoring 2) Fix comments 3) Use a more standard shebang, that will provide the right bash version
Paul Emm. Katsoulakis committed
Jun 13, 2019 at 17:59 UTC
ca69df172ff09d8e46cc751e6aeec1ee489584b1
2 files changed
+13
-5
packaging/installer/functions.sh
+1
-1
@@ -303,7 +303,7 @@ install_non_systemd_init() {
303
run rc-update add netdata default &&
304
return 0
305
306
- elif [ "${key}" = "debian-7" ] || [ "${key}" = "ubuntu-12.04" ] || [ "${key}" = "ubuntu-14.04" ]; then
306
+ elif [ "${key}" =~ ^devuan* ] || [ "${key}" = "debian-7" ] || [ "${key}" = "ubuntu-12.04" ] || [ "${key}" = "ubuntu-14.04" ]; then
307
echo >&2 "Installing LSB init file..."
308
run cp system/netdata-lsb /etc/init.d/netdata &&
309
run chmod 755 /etc/init.d/netdata &&
system/netdata-lsb.in
+12
-4
@@ -1,10 +1,18 @@
1
-#!/bin/bash
2
-# SPDX-License-Identifier: GPL-3.0-or-later
1
+#!/usr/bin/env bash
2
#
3
+# Netdata LSB start script
4
+#
5
+# Copyright:
6
+# SPDX-License-Identifier: GPL-3.0-or-later
7
+#
8
+# Author:
9
+# Costa Tsaousis <costa@netdata.cloud>
10
+# Pavlos Emm. Katsoulakis <paul@netdata.cloud>
11
+
12
### BEGIN INIT INFO
13
# Provides: netdata
6
-# Required-Start: $local_fs $remote_fs $network $named $time apache2 httpd squid nginx mysql named opensips upsd hostapd postfix lm_sensors
7
-# Required-Stop: $local_fs $remote_fs $network $named $time apache2 httpd squid nginx mysql named opensips upsd hostapd postfix lm_sensors
14
+# Required-Start: $local_fs $remote_fs $network $named $time
15
+# Required-Stop: $local_fs $remote_fs $network $named $time
16
# Should-Start: $local_fs $network $named $remote_fs $time $all
17
# Should-Stop: $local_fs $network $named $remote_fs $time $all
18
# Default-Start: 2 3 4 5