Просмотр исходного кода

Fix: Proftpd FTP Usage is showing incorrect information (#4672)

https://forum.hestiacp.com/t/ftp-usage-is-showing-incorrect-information/16882/8
Jaap Marcus 1 год назад
Родитель
Сommit
83e733d463
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      bin/v-update-sys-rrd-ftp

+ 4 - 1
bin/v-update-sys-rrd-ftp

@@ -75,7 +75,10 @@ if [ "$period" = 'daily' ]; then
 	a=0
 	a=$(ps aux | grep "$FTP_SYSTEM" | grep -v grep | grep -v nobody \
 		| grep -v root | wc -l)
-
+	if [ "$FTP_SYSTEM" = 'proftpd' ]; then
+		# Decrease numeber of connnections by 1 for proftpd ps aux always returns 1
+		a=$((a - 1))
+	fi
 	# Updating rrd database
 	rrdtool update $RRD/ftp/ftp.rrd N:$a
 fi