Tested and it`s ok. But i`m even lazzyer then you
Quote:#!/bin/sh
#
# ispcp-nightly-update
# Version: 0.0.1
# License: GPL
# Author : ispcomm
# Credits: ispcp development team
# Variables
BACKUPDIR="/var/www/backup"
WWWDIR="/var/www"
ISPCPDIR="${WWWDIR}/ispcp/"
REBUILD_SITES="yes"
TRUNK_DIR="/tmp/svn/"
#download trunk
mkdir -p ${TRUNK_DIR}
svn checkout http://www.isp-control.net/ispcp_svn/trunk/ ${TRUNK_DIR}
cd ${TRUNK_DIR}
# Backup current installation
mkdir -p ${BACKUPDIR}
pushd ${BACKUPDIR}
tar czpf "ispcp_backup-`date +'%Y-%m-%d %H-%M-%S'`.tar.gz" ${WWWDIR}/ispcp/
tar czpf "ispcp_backup-etc-`date +'%Y-%m-%d %H-%M-%S'`.tar.gz" /etc/ispcp/
cp -v ${WWWDIR}/ispcp/engine/ispcp-db-keys.pl .
cp -v ${WWWDIR}/ispcp/gui/include/ispcp-db-keys.php .
cp -v ${WWWDIR}/ispcp/gui/tools/pma/config.inc.php .
popd
# Compile ispcp. Install will copy files to /tmp/ispcp
make clean install
# Update current installation
/etc/init.d/ispcp_daemon stop
pushd /tmp/ispcp${WWWDIR}
cp -vR ispcp/ ${WWWDIR}
find ${ISPCPDIR} -type d -name '.svn' -exec rm -fr '{}' \;
popd
pushd ${BACKUPDIR}
cp -v ispcp-db-keys.pl ${WWWDIR}/ispcp/engine/
cp -v ispcp-db-keys.pl ${WWWDIR}/ispcp/engine/messager/
cp -v ispcp-db-keys.php ${WWWDIR}/ispcp/gui/include/
cp -v config.inc.php ${WWWDIR}/ispcp/gui/tools/pma/
popd
pushd ${WWWDIR}/ispcp/engine/setup/
./set-engine-permissions.sh
./set-gui-permissions.sh
popd
#../parts copying. This must be tuned by someone who know bash better then me. Work only with debian
find /tmp/ispcp/etc/ispcp -type d -name '.svn' -exec rm -fr '{}' \;
bla=`find /tmp/ispcp/etc/ispcp -type d -name 'parts' | awk -F"/" '{print "/"$2"/"$3"/"$4"/"$5"/"$6"/"$7}'`;
for x in $bla
do
bla2=`echo ${x} | awk -F"/" '{print "/"$4"/"$5"/"$6}'`
cp -vR $x $bla2
done
if [ $REBUILD_SITES == "yes" ] ; then
# Some old releases require this. not necessary for current ones.
#DELETE FROM config WHERE name = 'DATABASE_REVISION';
#read -p "Enter mysql pasword on prompt"
cat <<EOF | mysql -uroot -pYOURPASSWORD ispcp
UPDATE mail_users SET status='toadd' where status='ok';
UPDATE domain SET domain_status = 'change' WHERE domain_status = 'ok';
UPDATE domain_aliasses SET alias_status = 'change' WHERE alias_status = 'ok';
UPDATE subdomain SET subdomain_status = 'change' WHERE subdomain_status = 'ok';
EOF
${ISPCPDIR}/engine/ispcp-rqst-mngr
fi
/etc/init.d/ispcp_daemon start
rm -fRv /tmp/ispcp
/etc/init.d/apache2 restart
/etc/init.d/bind9 restart
Worked for me and i have added ../parts/ copy. Now i can update with cron.