Fix service installation on FreeBSD. (#13842)
Instead of using the correct path for installing the system service file, we were always hard-coding `/etc/init.d/netdata`. This happened to work correctly on Linux, but obviously breaks horribly on FreeBSD.
Austin S. Hemmelgarn committed
Oct 17, 2022 at 13:31 UTC
d4e22b8d0e749334b91a23b0d947422c00a8caa5
1 file changed
+1
-1
system/install-service.sh.in
+1
-1
@@ -113,7 +113,7 @@ install_generic_service() {
113
ENABLE="enable"
114
fi
115
116
- if ! install -p -m 0755 -o 0 -g 0 "${SVC_SOURCE}/netdata-${svc_type}" /etc/init.d/netdata; then
116
+ if ! install -p -m 0755 -o 0 -g 0 "${SVC_SOURCE}/netdata-${svc_type}" "${svc_file}"; then
117
error "Failed to install service file."
118
exit 4
119
fi