DirectAdmin script startips fails with an error c: command not found

There is a typo in /usr/local/directadmin/scripts/startips that breaks the script:

The script defines:


but uses:

ADDIP=`${DABIN} c | grep -m1 '^addip=' | cut -d= -f2`

resulting in errors:

./startips: line 36: c: command not found
./startips: line 62: 2a01:7c8:xxx:xx:xx:xx:0:1: command not found
./startips: line 62: command not found

And the missing IP on a network interface.

NGINX may fail to start as a result, leaving an error:

bind() to [2a01:7c8:xxx:xx:xx:xx:0:1]:80 failed (99: Cannot assign requested address)

Suggested fixes:

---        2021-12-08 16:05:11.000000000 +0100
+++ startips    2021-12-09 10:37:03.392490622 +0100
@@ -30,14 +30,15 @@
-ADDIP=`${DABIN} c | grep -m1 '^addip=' | cut -d= -f2`
+ADDIP=`${DIRECTADMIN_BIN} c | grep -m1 '^addip=' | cut -d= -f2`
 if [ -s $DIRECTADMIN_CONF ] && [ -x $DIRECTADMIN_BIN ]; then
         ETH_DEV=`$DIRECTADMIN_BIN c | grep '^ethernet_dev=' | cut -d= -f2`

This is a patch to /usr/local/directadmin/scripts/startips as a temporary solution, until the DirectAdmin developers fix it on their side.

As an additional solution you can set:

net.ipv4.ip_nonlocal_bind = 1
net.ipv6.ip_nonlocal_bind = 1

with him System Device.


Leave a Comment