diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-01-20 18:14:52 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-01-20 18:14:52 +0200 |
commit | 3827569c309284df52f5c75e48d78affdff2f0c0 (patch) | |
tree | 62bf23f63c20bebe9be889b511a632debb9f7df1 /installer | |
parent | 67d4998cca7ee3015ba90f0e2c1d35fd05d92f9c (diff) |
added freebsd init file
Diffstat (limited to 'installer')
-rw-r--r-- | installer/functions.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/installer/functions.sh b/installer/functions.sh index 2eeb92c8fc..5116daaef8 100644 --- a/installer/functions.sh +++ b/installer/functions.sh @@ -502,9 +502,15 @@ NETDATA_START_CMD="netdata" NETDATA_STOP_CMD="killall netdata" install_netdata_service() { + local uname="$(uname 2>/dev/null)" + if [ "${UID}" -eq 0 ] then - if issystemd + if [ "${uname}" = "FreeBSD" ] + then + run cp system/netdata-freebsd /etc/rc.d/netdata && \ + return 0 + elif issystemd then # systemd is running on this system NETDATA_START_CMD="systemctl start netdata" |