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