HEX
Server: Apache/2
System: Linux nexus-01 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User: aglcoke (1118)
PHP: 8.2.31
Disabled: mail,exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/cwaf/web/directadmin/scripts/install.sh
#!/bin/sh
#################################################
# VARS AND VARIOUS SETTINGS
#################################################
. /usr/local/directadmin/plugins/comodo_waf/scripts/variables.sh


################## MAIN PART ##############################

chown -R diradmin:diradmin "$PLUGIN_PATH"
chmod -R 755 "$PLUGIN_PATH/admin"
chmod -R 700 "$PLUGIN_PATH/scripts"

cd ${TMP_PATH}

echo "Download CWAF install file<br>"

#wget $WEBADDR --no-check-certificate
cp "$PLUGIN_PATH/scripts/cwaf_client_install.sh" ${TMP_PATH}

if [ -r ./cwaf_client_install.sh ]; then
  echo "Installing CWAF to ${INST_PATH}<br>"
  PLATFORM=""
  APACHE_RUNNING=$(ps ax | egrep -w '(httpd|apache|apache2)' | grep -v grep)
  NGINX_RUNNING=$(ps ax | egrep -w 'nginx' | grep -v grep)
  if [ ! -z "$NGINX_RUNNING" ]; then
    PLATFORM="--platform=Nginx"
  fi
  if [ ! -z "$APACHE_RUNNING" ]; then
    PLATFORM="--platform=Apache"
  fi

  sh ./cwaf_client_install.sh -- --batch --login=${LOGIN} --password=${PASSWD} ${PLATFORM} > /dev/null
  echo "<br>Preparing CWAF<br>"
  chown -R "$PLUGIN_USER" ${INST_PATH}
  rm ./cwaf_client_install.sh
  echo "<br>Comodo Web Application Firewall is installed!<br>"
else
  echo "Cannot find install script<br>"
fi


exit 0;