]> arthur.barton.de Git - netdata.git/blob - netdata-installer.sh
cgroups are enabled/disabled using their new names (it was needed because docker...
[netdata.git] / netdata-installer.sh
1 #!/bin/bash
2
3 # reload the user profile
4 [ -f /etc/profile ] && . /etc/profile
5
6 # fix PKG_CHECK_MODULES error
7 if [ -d /usr/share/aclocal ]
8 then
9         ACLOCAL_PATH=${ACLOCAL_PATH-/usr/share/aclocal}
10         export ACLOCAL_PATH
11 fi
12
13 LC_ALL=C
14
15 # you can set CFLAGS before running installer
16 CFLAGS="${CFLAGS--O3}"
17
18 # keep a log of this command
19 printf "\n# " >>netdata-installer.log
20 date >>netdata-installer.log
21 printf "CFLAGS=\"%s\" " "${CFLAGS}" >>netdata-installer.log
22 printf "%q " "$0" "${@}" >>netdata-installer.log
23 printf "\n" >>netdata-installer.log
24
25 ME="$0"
26 DONOTSTART=0
27 DONOTWAIT=0
28 NETDATA_PREFIX=
29 ZLIB_IS_HERE=0
30
31 usage() {
32         cat <<USAGE
33
34 ${ME} <installer options>
35
36 Valid <installer options> are:
37
38    --install /PATH/TO/INSTALL
39
40         If your give: --install /opt
41         netdata will be installed in /opt/netdata
42
43    --dont-start-it
44
45         Do not (re)start netdata.
46         Just install it.
47
48    --dont-wait
49
50         Do not wait for the user to press ENTER.
51         Start immediately building it.
52
53    --zlib-is-really-here
54
55         If you get errors about missing zlib,
56         but you know it is available,
57         you have a broken pkg-config.
58         Use this option to allow it continue
59         without checking pkg-config.
60
61 Netdata will by default be compiled with gcc optimization -O3
62 If you need to pass different CFLAGS, use something like this:
63
64   CFLAGS="<gcc options>" $ME <installer options>
65
66 For the installer to complete successfully, you will need
67 these packages installed:
68
69    gcc make autoconf automake pkg-config zlib1g-dev
70
71 For the plugins, you will at least need:
72
73    curl node
74
75 USAGE
76 }
77
78 while [ ! -z "${1}" ]
79 do
80         if [ "$1" = "--install" ]
81                 then
82                 NETDATA_PREFIX="${2}/netdata"
83                 shift 2
84         elif [ "$1" = "--zlib-is-really-here" ]
85                 then
86                 ZLIB_IS_HERE=1
87                 shift 1
88         elif [ "$1" = "--dont-start-it" ]
89                 then
90                 DONOTSTART=1
91                 shift 1
92         elif [ "$1" = "--dont-wait" ]
93                 then
94                 DONOTWAIT=1
95                 shift 1
96         elif [ "$1" = "--help" -o "$1" = "-h" ]
97                 then
98                 usage
99                 exit 1
100         else
101                 echo >&2
102                 echo >&2 "ERROR:"
103                 echo >&2 "I cannot understand option '$1'."
104                 usage
105                 exit 1
106         fi
107 done
108
109 cat <<BANNER
110
111 Welcome to netdata!
112 Nice to see you are giving it a try!
113
114 You are about to build and install netdata to your system.
115
116 It will be installed at these locations:
117
118   - the daemon    at ${NETDATA_PREFIX}/usr/sbin/netdata
119   - config files  at ${NETDATA_PREFIX}/etc/netdata
120   - web files     at ${NETDATA_PREFIX}/usr/share/netdata
121   - plugins       at ${NETDATA_PREFIX}/usr/libexec/netdata
122   - cache files   at ${NETDATA_PREFIX}/var/cache/netdata
123   - log files     at ${NETDATA_PREFIX}/var/log/netdata
124   - pid file      at ${NETDATA_PREFIX}/var/run
125
126 This installer allows you to change the installation path.
127 Press Control-C and run the same command with --help for help.
128
129 BANNER
130
131 if [ "${UID}" -ne 0 ]
132         then
133         if [ -z "${NETDATA_PREFIX}" ]
134                 then
135                 cat <<NONROOTNOPREFIX
136
137 Sorry! This will fail!
138
139 You are attempting to install netdata as non-root, but you plan to install it
140 in system paths.
141
142 Please set an installation prefix, like this:
143
144     $0 ${@} --install /tmp
145
146 or, run the installer as root:
147
148     sudo $0 ${@}
149
150 We suggest to install it as root, or certain data collectors will not be able
151 to work. Netdata drops root privileges when running. So, if you plan to keep
152 it, install it as root to get the full functionality.
153
154 NONROOTNOPREFIX
155                 exit 1
156
157         else
158                 cat <<NONROOT
159
160 IMPORTANT:
161 You are about to install netdata as a non-root user.
162 Netdata will work, but a few data collection modules that
163 require root access will fail.
164
165 If you installing permanently on your system, run the
166 installer like this:
167
168     sudo $0 ${@}
169
170 NONROOT
171         fi
172 fi
173
174 have_autotools=
175 if [ "$(type autoreconf 2> /dev/null)" ]
176 then
177         autoconf_maj_min() {
178                 local maj min IFS=.-
179
180                 maj=$1
181                 min=$2
182
183                 set -- $(autoreconf -V | sed -ne '1s/.* \([^ ]*\)$/\1/p')
184                 eval $maj=\$1 $min=\$2
185         }
186         autoconf_maj_min AMAJ AMIN
187
188         if [ "$AMAJ" -gt 2 ]
189         then
190                 have_autotools=Y
191         elif [ "$AMAJ" -eq 2 -a "$AMIN" -ge 60 ]
192         then
193                 have_autotools=Y
194         else
195                 echo "Found autotools $AMAJ.$AMIN"
196         fi
197 else
198         echo "No autotools found"
199 fi
200
201 if [ ! "$have_autotools" ]
202 then
203         if [ -f configure ]
204         then
205                 echo "Will skip autoreconf step"
206         else
207                 cat <<-"EOF"
208
209         -------------------------------------------------------------------------------
210         autotools 2.60 or later is required
211
212         Sorry, you do not seem to have autotools 2.60 or later, which is
213         required to build from the git sources of netdata.
214
215         You can either install a suitable version of autotools and automake
216         or download a netdata package which does not have these dependencies.
217
218         Source packages where autotools have already been run are available
219         here:
220                https://firehol.org/download/netdata/
221
222         The unsigned/master folder tracks the head of the git tree and released
223         packages are also available.
224         EOF
225                 exit 1
226         fi
227 fi
228
229 if [ ${DONOTWAIT} -eq 0 ]
230         then
231         if [ ! -z "${NETDATA_PREFIX}" ]
232                 then
233                 read -p "Press ENTER to build and install netdata to '${NETDATA_PREFIX}' > "
234         else
235                 read -p "Press ENTER to build and install netdata to your system > "
236         fi
237 fi
238
239 build_error() {
240         cat <<EOF
241
242 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
243
244 Sorry! NetData failed to build...
245
246 You many need to check these:
247
248 1. The package zlib1g-dev has to be installed.
249
250 2. You need basic build tools installed, like:
251
252    gcc make autoconf automake pkg-config
253
254    Autoconf version 2.60 or higher is required
255
256 3. If your system cannot find ZLIB, although it is installed
257    run me with the option:  --zlib-is-really-here
258
259
260 If you still cannot get it to build, ask for help at github:
261
262    https://github.com/firehol/netdata/issues
263
264
265 EOF
266         trap - EXIT
267         exit 1
268 }
269
270 run() {
271         printf >&2 "\n"
272         printf >&2 ":-----------------------------------------------------------------------------\n"
273         printf >&2 "Running command:\n"
274         printf >&2 "\n"
275         printf >&2 "%q " "${@}"
276         printf >&2 "\n"
277         printf >&2 "\n"
278
279         "${@}"
280 }
281
282 if [ ${ZLIB_IS_HERE} -eq 1 ]
283         then
284         shift
285         echo >&2 "ok, assuming zlib is really installed."
286         export ZLIB_CFLAGS=" "
287         export ZLIB_LIBS="-lz"
288 fi
289
290 trap build_error EXIT
291
292 if [ "$have_autotools" ]
293 then
294         run ./autogen.sh || exit 1
295 fi
296
297 run ./configure \
298         --prefix="${NETDATA_PREFIX}/usr" \
299         --sysconfdir="${NETDATA_PREFIX}/etc" \
300         --localstatedir="${NETDATA_PREFIX}/var" \
301         --with-zlib --with-math --with-user=netdata \
302         CFLAGS="${CFLAGS}" || exit 1
303
304 # remove the build_error hook
305 trap - EXIT
306
307 if [ -f src/netdata ]
308         then
309         echo >&2 "Cleaning a possibly old compilation ..."
310         run make clean
311 fi
312
313 echo >&2 "Compiling netdata ..."
314 run make || exit 1
315
316 # backup user configurations
317 for x in apps_groups.conf charts.d.conf
318 do
319         if [ -f "${NETDATA_PREFIX}/etc/netdata/${x}" ]
320                 then
321                 cp -p "${NETDATA_PREFIX}/etc/netdata/${x}" "${NETDATA_PREFIX}/etc/netdata/${x}.installer_backup"
322         fi
323 done
324
325 echo >&2 "Installing netdata ..."
326 run make install || exit 1
327
328 # restore user configurations
329 for x in apps_groups.conf charts.d.conf
330 do
331         if [ -f "${NETDATA_PREFIX}/etc/netdata/${x}.installer_backup" ]
332                 then
333                 cp -p "${NETDATA_PREFIX}/etc/netdata/${x}.installer_backup" "${NETDATA_PREFIX}/etc/netdata/${x}"
334         fi
335 done
336
337 if [ ${UID} -eq 0 ]
338         then
339         echo >&2 "Adding netdata user group ..."
340         getent group netdata > /dev/null || run groupadd -r netdata
341
342         echo >&2 "Adding netdata user account ..."
343         getent passwd netdata > /dev/null || run useradd -r -g netdata -c netdata -s /sbin/nologin -d / netdata
344 fi
345
346
347 # -----------------------------------------------------------------------------
348 # load options from the configuration file
349
350 # create an empty config if it does not exist
351 [ ! -f "${NETDATA_PREFIX}/etc/netdata/netdata.conf" ] && touch "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
352
353 # function to extract values from the config file
354 config_option() {
355         local key="${1}" value="${2}" line=
356
357         if [ -s "${NETDATA_PREFIX}/etc/netdata/netdata.conf" ]
358                 then
359                 line="$( grep "^[[:space:]]*${key}[[:space:]]*=[[:space:]]*" "${NETDATA_PREFIX}/etc/netdata/netdata.conf" | head -n 1 )"
360                 [ ! -z "${line}" ] && value="$( echo "${line}" | cut -d '=' -f 2 | sed -e "s/^[[:space:]]\+//g" -e "s/[[:space:]]\+$//g" )"
361         fi
362
363         echo "${value}"
364 }
365
366 # user
367 defuser="netdata"
368 [ ! "${UID}" = "0" ] && defuser="${USER}"
369 NETDATA_USER="$( config_option "run as user" "${defuser}" )"
370
371 NETDATA_WEB_USER="$( config_option "web files owner" "${defuser}" )"
372 NETDATA_WEB_GROUP="$( config_option "web files group" "${NETDATA_WEB_USER}" )"
373
374 # debug flags
375 defdebug=0
376 NETDATA_DEBUG="$( config_option "debug flags" ${defdebug} )"
377
378 # port
379 defport=19999
380 NETDATA_PORT="$( config_option "port" ${defport} )"
381
382 # directories
383 NETDATA_CACHE_DIR="$( config_option "cache directory" "${NETDATA_PREFIX}/var/cache/netdata" )"
384 NETDATA_WEB_DIR="$( config_option "web files directory" "${NETDATA_PREFIX}/usr/share/netdata/web" )"
385 NETDATA_LOG_DIR="$( config_option "log directory" "${NETDATA_PREFIX}/var/log/netdata" )"
386 NETDATA_CONF_DIR="$( config_option "config directory" "${NETDATA_PREFIX}/etc/netdata" )"
387 NETDATA_RUN_DIR="${NETDATA_PREFIX}/var/run"
388
389
390 # -----------------------------------------------------------------------------
391 # prepare the directories
392
393 # this is needed if NETDATA_PREFIX is not empty
394 if [ ! -d "${NETDATA_RUN_DIR}" ]
395         then
396         mkdir -p "${NETDATA_RUN_DIR}" || exit 1
397 fi
398
399 echo >&2 "Fixing directories (user: ${NETDATA_USER})..."
400 for x in "${NETDATA_WEB_DIR}" "${NETDATA_CONF_DIR}" "${NETDATA_CACHE_DIR}" "${NETDATA_LOG_DIR}"
401 do
402         if [ ! -d "${x}" ]
403                 then
404                 echo >&2 "Creating directory '${x}'"
405                 run mkdir -p "${x}" || exit 1
406         fi
407
408         if [ ${UID} -eq 0 ]
409                 then
410                 if [ "${x}" = "${NETDATA_WEB_DIR}" ]
411                         then
412                         run chown -R "${NETDATA_WEB_USER}:${NETDATA_WEB_GROUP}" "${x}" || echo >&2 "WARNING: Cannot change the ownership of the files in directory ${x} to ${NETDATA_WEB_USER}:${NETDATA_WEB_GROUP}..."
413                 else
414                         run chown -R "${NETDATA_USER}:${NETDATA_USER}" "${x}" || echo >&2 "WARNING: Cannot change the ownership of the files in directory ${x} to ${NETDATA_USER}..."
415                 fi
416         fi
417
418         run chmod 0755 "${x}" || echo >&2 "WARNING: Cannot change the permissions of the directory ${x} to 0755..."
419 done
420
421 if [ ${UID} -eq 0 ]
422         then
423         # fix apps.plugin to be setuid to root
424         run chown root "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
425         run chmod 4755 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
426 fi
427
428 # -----------------------------------------------------------------------------
429 # check if we can re-start netdata
430
431 if [ ${DONOTSTART} -eq 1 ]
432         then
433         if [ ! -s "${NETDATA_PREFIX}/etc/netdata/netdata.conf" ]
434                 then
435                 echo >&2 "Generating empty config file in: ${NETDATA_PREFIX}/etc/netdata/netdata.conf"
436                 echo "# Get config from http://127.0.0.1:${NETDATA_PORT}/netdata.conf" >"${NETDATA_PREFIX}/etc/netdata/netdata.conf"
437
438                 if [ "${UID}" -eq 0 ]
439                         then
440                         chown "${NETDATA_USER}" "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
441                 fi
442                 chmod 0664 "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
443         fi
444         echo >&2 "OK. It is now installed and ready."
445         exit 0
446 fi
447
448 # -----------------------------------------------------------------------------
449 # stop a running netdata
450
451 isnetdata() {
452         [ -z "$1" -o ! -f "/proc/$1/stat" ] && return 1
453         [ "$(cat "/proc/$1/stat" | cut -d '(' -f 2 | cut -d ')' -f 1)" = "netdata" ] && return 0
454         return 1
455 }
456
457
458 printf >&2 "Stopping a (possibly) running netdata..."
459 ret=0
460 count=0
461 while [ $ret -eq 0 ]
462 do
463         if [ $count -gt 30 ]
464                 then
465                 echo >&2 "Cannot stop the running netdata."
466                 exit 1
467         fi
468
469         count=$((count + 1))
470
471         pid=$(cat "${NETDATA_RUN_DIR}/netdata.pid" 2>/dev/null)
472         # backwards compatibility
473         [ -z "${pid}" ] && pid=$(cat /var/run/netdata.pid 2>/dev/null)
474         [ -z "${pid}" ] && pid=$(cat /var/run/netdata/netdata.pid 2>/dev/null)
475         
476         isnetdata $pid || pid=
477         if [ ! -z "${pid}" ]
478                 then
479                 run kill $pid 2>/dev/null
480                 ret=$?
481         else
482                 run killall netdata 2>/dev/null
483                 ret=$?
484         fi
485
486         test $ret -eq 0 && printf >&2 "." && sleep 2
487 done
488 echo >&2
489 echo >&2
490
491
492 # -----------------------------------------------------------------------------
493 # run netdata
494
495 echo >&2 "Starting netdata..."
496 run ${NETDATA_PREFIX}/usr/sbin/netdata -pidfile ${NETDATA_RUN_DIR}/netdata.pid "${@}"
497
498 if [ $? -ne 0 ]
499         then
500         echo >&2
501         echo >&2 "SORRY! FAILED TO START NETDATA!"
502         exit 1
503 else
504         echo >&2 "OK. NetData Started!"
505 fi
506
507
508 # -----------------------------------------------------------------------------
509 # save a config file, if it is not already there
510
511 if [ ! -s "${NETDATA_PREFIX}/etc/netdata/netdata.conf" ]
512         then
513         echo >&2 "Downloading default configuration from netdata..."
514         sleep 5
515
516         # remove a possibly obsolete download
517         [ -f "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" ] && rm "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new"
518
519         # disable a proxy to get data from the local netdata
520         export http_proxy=
521         export https_proxy=
522
523         # try wget
524         wget 2>/dev/null -O "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" "http://localhost:${NETDATA_PORT}/netdata.conf"
525         ret=$?
526
527         # try curl
528         if [ $ret -ne 0 -o ! -s "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" ]
529                 then
530                 curl -s -o "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" "http://localhost:${NETDATA_PORT}/netdata.conf"
531                 ret=$?
532         fi
533
534         if [ $ret -eq 0 -a -s "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" ]
535                 then
536                 mv "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
537                 echo >&2 "New configuration saved for you to edit at ${NETDATA_PREFIX}/etc/netdata/netdata.conf"
538
539                 if [ "${UID}" -eq 0 ]
540                         then
541                         chown "${NETDATA_USER}" "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
542                 fi
543                 chmod 0664 "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
544         else
545                 echo >&2 "Cannnot download configuration from netdata daemon using url 'http://localhost:${NETDATA_PORT}/netdata.conf'"
546                 [ -f "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new" ] && rm "${NETDATA_PREFIX}/etc/netdata/netdata.conf.new"
547         fi
548 fi
549
550 # -----------------------------------------------------------------------------
551 # Check for KSM
552
553 ksm_is_available_but_disabled() {
554         cat <<KSM1
555
556 -------------------------------------------------------------------------------
557 Memory de-duplication instructions
558
559 I see you have kernel memory de-duper (called Kernel Same-page Merging,
560 or KSM) available, but it is not currently enabled.
561
562 To enable it run:
563
564 echo 1 >/sys/kernel/mm/ksm/run
565 echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs
566
567 If you enable it, you will save 40-60% of netdata memory.
568
569 KSM1
570 }
571
572 ksm_is_not_available() {
573         cat <<KSM2
574
575 -------------------------------------------------------------------------------
576 Memory de-duplication not present in your kernel
577
578 It seems you do not have kernel memory de-duper (called Kernel Same-page
579 Merging, or KSM) available.
580
581 To enable it, you need a kernel built with CONFIG_KSM=y
582
583 If you can have it, you will save 40-60% of netdata memory.
584
585 KSM2
586 }
587
588 if [ -f "/sys/kernel/mm/ksm/run" ]
589         then
590         if [ $(cat "/sys/kernel/mm/ksm/run") != "1" ]
591                 then
592                 ksm_is_available_but_disabled
593         fi
594 else
595         ksm_is_not_available
596 fi
597
598 # -----------------------------------------------------------------------------
599 # Check for version.txt
600
601 if [ ! -s web/version.txt ]
602         then
603 cat <<VERMSG
604
605 -------------------------------------------------------------------------------
606 Version update check warning
607
608 The way you downloaded netdata, we cannot find its version. This means the
609 Update check on the dashboard, will not work.
610
611 If you want to have version update check, please re-install it
612 following the procedure in:
613
614 https://github.com/firehol/netdata/wiki/Installation
615
616 VERMSG
617 fi
618
619 # -----------------------------------------------------------------------------
620 # apps.plugin warning
621
622 if [ "${UID}" -ne 0 ]
623         then
624 cat <<SETUID_WARNING
625
626 -------------------------------------------------------------------------------
627 apps.plugin needs privileges
628
629 Since you have installed netdata as a normal user, to have apps.plugin collect
630 all the needed data, you have to give it the access rights it needs, by running
631 these commands:
632
633         sudo chown root "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
634         sudo chmod 4755 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin"
635
636 The commands allow apps.plugin to run as root.
637
638 apps.plugin is performing a hard-coded function of data collection for all
639 running processes. It cannot be instructed from the netdata daemon to perform
640 any task, so it is pretty safe to do this.
641
642 SETUID_WARNING
643 fi
644
645 # -----------------------------------------------------------------------------
646 # Keep un-install info
647
648 cat >netdata-uninstaller.sh <<UNINSTALL
649 #!/bin/bash
650
651 # this script will uninstall netdata
652
653 if [ "\$1" != "--force" ]
654         then
655         echo >&2 "This script will REMOVE netdata from your system."
656         echo >&2 "Run it again with --force to do it."
657         exit 1
658 fi
659
660 echo >&2 "Stopping a possibly running netdata..."
661 killall netdata
662 sleep 2
663
664 deletedir() {
665         if [ ! -z "\$1" -a -d "\$1" ]
666                 then
667                 echo
668                 echo "Deleting directory '\$1' ..."
669                 rm -I -R "\$1"
670         fi
671 }
672
673 if [ ! -z "${NETDATA_PREFIX}" -a -d "${NETDATA_PREFIX}" ]
674         then
675         # installation prefix was given
676
677         deletedir "${NETDATA_PREFIX}"
678
679 else
680         # installation prefix was NOT given
681
682         if [ -f "${NETDATA_PREFIX}/usr/sbin/netdata" ]
683                 then
684                 echo "Deleting ${NETDATA_PREFIX}/usr/sbin/netdata ..."
685                 rm -i "${NETDATA_PREFIX}/usr/sbin/netdata"
686         fi
687
688         deletedir "${NETDATA_PREFIX}/etc/netdata"
689         deletedir "${NETDATA_PREFIX}/usr/share/netdata"
690         deletedir "${NETDATA_PREFIX}/usr/libexec/netdata"
691         deletedir "${NETDATA_PREFIX}/var/cache/netdata"
692         deletedir "${NETDATA_PREFIX}/var/log/netdata"
693 fi
694
695 getent passwd netdata > /dev/null
696 if [ $? -eq 0 ]
697         then
698         echo
699         echo "You may also want to remove the user netdata"
700         echo "by running:"
701         echo "   userdel netdata"
702 fi
703
704 getent group netdata > /dev/null
705 if [ $? -eq 0 ]
706         then
707         echo
708         echo "You may also want to remove the group netdata"
709         echo "by running:"
710         echo "   groupdel netdata"
711 fi
712
713 UNINSTALL
714 chmod 750 netdata-uninstaller.sh
715
716 # -----------------------------------------------------------------------------
717
718 cat <<END
719
720
721 -------------------------------------------------------------------------------
722
723 OK. NetData is installed and it is running.
724
725 -------------------------------------------------------------------------------
726
727
728 Hit http://localhost:${NETDATA_PORT}/ from your browser.
729
730 To stop netdata, just kill it, with:
731
732   killall netdata
733
734 To start it, just run it:
735
736   ${NETDATA_PREFIX}/usr/sbin/netdata
737
738
739 Enjoy!
740
741                  Give netdata a Github Star, at:
742
743              https://github.com/firehol/netdata/wiki
744
745
746 END
747 echo >&2 "Uninstall script generated: ./netdata-uninstaller.sh"