Try this code instead:
Code:
#!/bin/bash
#MODIFY THIS
PATH_TO_RC="/_backup/ispcp"
ROOTSQLPASSWORD="@Totalitarism1";
#Set for debian
INST_PREF="/tmp/ispcp"
CONF_DIR="/etc/ispcp"
APACHE_CONF_DIR="/etc/apache2"
ROOT_DIR="/var/www/ispcp"
CMD_ISPCPD="/etc/init.d/ispcp_daemon"
CMD_HTTPD="/usr/sbin/apache2ctl"
CMD_NAMED="/etc/init.d/bind9"
CMD_MTA="/etc/init.d/postfix"
#CODE START HERE
cd $PATH_TO_RC
make clean
make install
${CMD_ISPCPD} stop
bla=`find ${INST_PREF}/etc/ispcp -type d -name 'parts'`;
for x in $bla;
do
bla2=`echo ${x} | awk -F"${INST_PREF}|/parts" '{print $2}'`
cp -fvR $x $bla2
done
cp -fv ${INST_PREF}${CONF_DIR}/apache/httpd.conf ${APACHE_CONF_DIR}/sites-available/ispcp.conf
cp -fv ${INST_PREF}${CONF_DIR}/apache/httpd.conf ${CONF_DIR}/apache/httpd.conf
cp -fv ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf
cat <<EOF | mysql -uroot -p${ROOTSQLPASSWORD} ispcp
UPDATE domain SET domain_status = 'change';
UPDATE domain_aliasses SET alias_status = 'change';
UPDATE subdomain SET subdomain_status = 'change';
TRUNCATE TABLE login;
EOF
${ROOT_DIR}/engine/ispcp-rqst-mngr
${CMD_ISPCPD} start
cd $PATH_TO_RC
make clean
${CMD_HTTPD} restart
${CMD_NAMED} restart
${CMD_MTA} restart