]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Drop use of service_tcp_ports
authorMartin Schwenke <martin@meltin.net>
Wed, 6 Jul 2016 04:32:38 +0000 (14:32 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 21 Jul 2016 00:24:25 +0000 (02:24 +0200)
This makes the logic more obvious.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/40.vsftpd

index 64da6fd16d2984112735e7431c543051910b9602..cdc99830bebb4a1ddc5460d4c61a50e482934c74 100755 (executable)
@@ -24,7 +24,6 @@ service_reconfigure ()
 }
 
 service_fail_limit=2
-service_tcp_ports=21
 
 loadconfig
 
@@ -48,16 +47,14 @@ takeip|releaseip)
        ;;
 
 monitor)
-       if [ -n "$service_tcp_ports" ] ; then
-           if ctdb_check_tcp_ports $service_tcp_ports ; then
+       if ctdb_check_tcp_ports 21 ; then
                ctdb_counter_init
-           else
+       else
                ctdb_counter_incr
                ctdb_check_counter
                ctdb_check_counter "quiet" -ge 1 || \
-                   echo "WARNING: vsftpd not listening but less than $service_fail_limit consecutive failures, not unhealthy yet" 
-           fi
-       fi      
+                   echo "WARNING: vsftpd not listening but less than $service_fail_limit consecutive failures, not unhealthy yet"
+       fi
        ;;
 esac