From 36e9774a1b12994d83d9f106f81229e780b8b61e Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 4 Jan 2019 14:17:21 +0100 Subject: [PATCH] mxvipctl: Continue on error Fixes #3 If /etc/mxstartups contains invalid port numbers (e.g. out of range), mxvipctl aborts and other services, which have valid entries, will also not be started: buczek@theinternet:~/git/mxstartup ((06ba2f6...))$ grep theinternet /etc/mxstartups test1 theinternet - /bin/true -[80:4432423] test2 theinternet - /bin/true -[80:8080] buczek@theinternet:~/git/mxstartup ((06ba2f6...))$ sudo mxstartupctl start starting /run/mariux/mxvip.test1.cfg .. adding forward 141.14.31.7:80 <-> 141.14.31.7:4432423 iptables v1.6.0: Port `4432423' not valid Try `iptables -h' or 'iptables --help' for more information. starting /run/mariux/mxservice.test1.cfg .. starting /run/mariux/mxservice.test2.cfg .. buczek@theinternet:~/git/mxstartup ((06ba2f6...))$ Remove `-e` option of the shell. --- mxvipctl | 3 --- 1 file changed, 3 deletions(-) diff --git a/mxvipctl b/mxvipctl index 09ae4ad..0939c0a 100755 --- a/mxvipctl +++ b/mxvipctl @@ -9,9 +9,6 @@ RUNDIR="/run/mariux" # expands *-pattern in pathnames to null if no matching files are found.. shopt -s nullglob -# exit on any error -set -e - function mxvip_start_one() { local vip=$1 local -i i mip mfwd