Error c: command not found in DirectAdmin script startips

Are you happy with your current hosting provider ?

It’s not working because of a mistake in the script: /usr/local/directadmin/scripts/startips

The script explains:

DIRECTADMIN_BIN=/usr/local/directadmin/directadmin

but uses:

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


Errors come up with the following commands: 


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

and a network interface with no IP addresses.

If NGINX is unable to start, the following message will be displayed:

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

As a solution:

--- startips.org        2021-12-08 16:05:11.000000000 +0100
+++ startips    2021-12-09 10:37:03.392490622 +0100
@@ -30,14 +30,15 @@
        fi
 fi
+DIRECTADMIN_BIN=/usr/local/directadmin/directadmin
+DIRECTADMIN_CONF=/usr/local/directadmin/conf/directadmin.conf
+
 IPPATH="/usr/local/directadmin/data/admin/"
 IPDIR="ips/"
 IPLIST="ip.list"
-ADDIP=`${DABIN} c | grep -m1 '^addip=' | cut -d= -f2`
+ADDIP=`${DIRECTADMIN_BIN} c | grep -m1 '^addip=' | cut -d= -f2`
 OS=`uname`
-DIRECTADMIN_BIN=/usr/local/directadmin/directadmin
-DIRECTADMIN_CONF=/usr/local/directadmin/conf/directadmin.conf
 if [ -s $DIRECTADMIN_CONF ] && [ -x $DIRECTADMIN_BIN ]; then
         ETH_DEV=`$DIRECTADMIN_BIN c | grep '^ethernet_dev=' | cut -d= -f2`
 fi

Temporary workaround for a problem in the DirectAdmin scripts directory, until DirectAdmin fixes it.

Alternately, you might enter:

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



About Our Team

As a team of experts, we install, configure, migrate and manage remote Linux/Unix-like OS-based virtual and dedicated servers powered by DirectAdmin. We support a wide range of applications, including Apache, Nginx web servers, Bind, PowerDNS domain name servers, POP3, IMAP, and SMTP email servers, and FTP servers, among others. Our team has accumulated considerable knowledge and universal solutions that may be used to a wide range of activities. Allowing you more time to do the things you like is our goal, and we're happy to provide a helping hand by managing your servers for you.