Somehow DA_FOREGROUND_CUSTOMBUILD environment variable does not work. Running setup like:
DA_FOREGROUND_CUSTOMBUILD=true ./setup.sh <client_id> <license_id> <interface> <ip address>
will install custombuild options in the background. We have an options.conf placed in a empty /usr/local/directadmin/custombuild with all the settings we need for the build.
We tested this part of the setup in a bash script (test.sh) and it works without a problem.
if [ -z "${DA_FOREGROUND_CUSTOMBUILD}" ]; then
echo "DA_FOREGROUND_CUSTOMBUILD=false"
else
echo "DA_FOREGROUND_CUSTOMBUILD=true"
fi
[srv1 ~]# DA_FOREGROUND_CUSTOMBUILD=true ./test.sh
DA_FOREGROUND_CUSTOMBUILD=true
But somehow in the setup.sh it does not work. Everytime we run "DA_FOREGROUND_CUSTOMBUILD=true ./setup.sh", custombuild runs in the background and shows the echo line "You will receive a message in the DirectAdmin panel when background installation finalizes."
Because we use ansible to deploy DA on remote hosts, we need to monitor the progress of the custombuild.
----------
setup.sh custombuild part
${DA_PATH}/custombuild/build update >> ${DA_PATH}/custombuild/install.txt 2>&1 &
if [ -z "${DA_FOREGROUND_CUSTOMBUILD}" ]; then
${DA_PATH}/custombuild/build all d >> ${DA_PATH}/custombuild/install.txt 2>&1 &
echogreen "You will receive a message in the DirectAdmin panel when background installation finalizes."
else
${DA_PATH}/custombuild/build all d | tee ${DA_PATH}/custombuild/install.txt
fi
DA_FOREGROUND_CUSTOMBUILD=true ./setup.sh <client_id> <license_id> <interface> <ip address>
will install custombuild options in the background. We have an options.conf placed in a empty /usr/local/directadmin/custombuild with all the settings we need for the build.
We tested this part of the setup in a bash script (test.sh) and it works without a problem.
if [ -z "${DA_FOREGROUND_CUSTOMBUILD}" ]; then
echo "DA_FOREGROUND_CUSTOMBUILD=false"
else
echo "DA_FOREGROUND_CUSTOMBUILD=true"
fi
[srv1 ~]# DA_FOREGROUND_CUSTOMBUILD=true ./test.sh
DA_FOREGROUND_CUSTOMBUILD=true
But somehow in the setup.sh it does not work. Everytime we run "DA_FOREGROUND_CUSTOMBUILD=true ./setup.sh", custombuild runs in the background and shows the echo line "You will receive a message in the DirectAdmin panel when background installation finalizes."
Because we use ansible to deploy DA on remote hosts, we need to monitor the progress of the custombuild.
----------
setup.sh custombuild part
${DA_PATH}/custombuild/build update >> ${DA_PATH}/custombuild/install.txt 2>&1 &
if [ -z "${DA_FOREGROUND_CUSTOMBUILD}" ]; then
${DA_PATH}/custombuild/build all d >> ${DA_PATH}/custombuild/install.txt 2>&1 &
echogreen "You will receive a message in the DirectAdmin panel when background installation finalizes."
else
${DA_PATH}/custombuild/build all d | tee ${DA_PATH}/custombuild/install.txt
fi
Last edited: