Skip to content

Commit 1543f45

Browse files
authored
treehouses services ntopng added (fixes #618) (#656)
1 parent a0e9dd5 commit 1543f45

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

modules/services.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ function services {
138138
echo "portainer built and started"
139139
check_tor "9000"
140140
;;
141+
ntopng)
142+
docker volume create ntopng_data
143+
docker run --name ntopng -d -p 8090:8090 -v /var/run/docker.sock:/var/run/docker.sock -v ntopng_data:/data jonbackhaus/ntopng --http-port=8090
144+
echo "ntopng built and started"
145+
check_tor "8090"
146+
;;
141147
*)
142148
echo "unknown service"
143149
;;
@@ -146,7 +152,7 @@ function services {
146152

147153
down)
148154
case "$service_name" in
149-
planet|kolibri|pihole|moodle|privatebin|nextcloud|portainer)
155+
planet|kolibri|pihole|moodle|privatebin|nextcloud|portainer|ntopng)
150156
if [ ! -e /srv/${service_name}/${service_name}.yml ]; then
151157
echo "yml file doesn't exit"
152158
else
@@ -162,7 +168,7 @@ function services {
162168

163169
start)
164170
case "$service_name" in
165-
planet|kolibri|pihole|moodle|privatebin|nextcloud|portainer)
171+
planet|kolibri|pihole|moodle|privatebin|nextcloud|portainer|ntopng)
166172
if docker ps -a | grep -q $service_name; then
167173
docker-compose -f /srv/${service_name}/${service_name}.yml start
168174
echo "${service_name} started"
@@ -178,7 +184,7 @@ function services {
178184

179185
stop)
180186
case "$service_name" in
181-
planet|kolibri|pihole|moodle|privatebin|nextcloud|portainer)
187+
planet|kolibri|pihole|moodle|privatebin|nextcloud|portainer|ntopng)
182188
if docker ps -a | grep -q $service_name; then
183189
docker-compose -f /srv/${service_name}/${service_name}.yml stop
184190
echo "${service_name} stopped"
@@ -311,6 +317,16 @@ function services {
311317
echo "easily manage your different Docker environments (Docker hosts or"
312318
echo "Swarm clusters).\""
313319
;;
320+
ntopng)
321+
echo "https://github.com/ntop/ntopng"
322+
echo
323+
echo "\"ntopng is the next generation version of the original ntop,"
324+
echo "a network traffic probe that monitors network usage. ntopng is"
325+
echo "based on libpcap and it has been written in a portable way in order"
326+
echo "to virtually run on every Unix platform, MacOSX and on Windows as well."
327+
echo "Educational users can obtain commercial products at no cost please see here:"
328+
echo "https://www.ntop.org/support/faq/do-you-charge-universities-no-profit-and-research/\""
329+
;;
314330
esac
315331
;;
316332

@@ -421,6 +437,9 @@ function get_port {
421437
portainer)
422438
echo "9000"
423439
;;
440+
ntopng)
441+
echo "8090"
442+
;;
424443
*)
425444
echo "unknown service"
426445
;;
@@ -438,6 +457,7 @@ function services_help {
438457
# echo " Moodle"
439458
echo " PrivateBin"
440459
echo " Portainer"
460+
echo " Ntopng"
441461
echo
442462
echo
443463
echo "Top-Level Commands:"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@treehouses/cli",
3-
"version": "1.13.10",
3+
"version": "1.13.11",
44
"description": "Thin command-line interface for Raspberry Pi low level configuration.",
55
"main": "cli.sh",
66
"bin": {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ntopng_autorun=true
2+
3+
if [ "ntopng_autorun" = true ]; then
4+
docker volume create ntopng_data
5+
docker run --name ntopng -d -p 8090:8090 -v /var/run/docker.sock:/var/run/docker.sock -v ntopng_data:/data jonbackhaus/ntopng --http-port=8090
6+
fi
7+

0 commit comments

Comments
 (0)