Here it is:
Code:
yum install -y expat-devel.i386
/usr/local/directadmin/custombuild/build apache
wget -O /usr/local/directadmin/scripts/custom/user_create_post.sh "https://dasvn.googlecode.com/svn/trunk/Custom scripts/user_create_post.sh"
wget -O /usr/local/directadmin/scripts/custom/domain_create_post.sh "https://dasvn.googlecode.com/svn/trunk/Custom scripts/domain_create_post.sh"
wget -O /usr/local/directadmin/scripts/custom/domain_destroy_pre.sh "https://dasvn.googlecode.com/svn/trunk/Custom scripts/domain_destroy_pre.sh"
wget -O /usr/local/directadmin/data/templates/custom/virtual_host2.conf "https://dasvn.googlecode.com/svn/trunk/Custom scripts/virtual_host2.conf"
wget -O /usr/local/directadmin/data/templates/custom/virtual_host2_secure.conf "https://dasvn.googlecode.com/svn/trunk/Custom scripts/virtual_host2_secure.conf"
chown diradmin:diradmin /usr/local/directadmin/scripts/custom/*
chmod 700 /usr/local/directadmin/scripts/custom/*.sh
chown diradmin:diradmin /usr/local/directadmin/data/templates/custom/*
cd /root/
mkdir /etc/svn
mkdir /etc/svn/sqlite-amalgamation/
wget -O /root/subversion-1.6.5.tar.gz https://dasvn.googlecode.com/svn/trunk/Files/subversion-1.6.5.tar.gz
tar xzf subversion-1.6.5.tar.gz
mv /root/subversion-1.6.5/* /etc/svn/
wget -O /root/sqlite-amalgamation-3.6.13.tar.gz http://dasvn.googlecode.com/svn/trunk/Files/sqlite-amalgamation-3.6.13.tar.gz
tar zxf /root/sqlite-amalgamation-3.6.13.tar.gz
mv /root/sqlite-3.6.13/sqlite3.c /etc/svn/sqlite-amalgamation/
rm -rf /root/sqlite*
rm -rf /root/subversion-1.6.5*
cd /etc/svn/
/etc/svn/configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config
yum install -y expat-devel.x86_64
make
make install
/sbin/ldconfig
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/etc/init.d/httpd restart
mkdir /scripts
cd /scripts/
wget -O /scripts/fixcurentusers.sh "http://dasvn.googlecode.com/svn/trunk/Custom scripts/fixcurentusers.sh"
chmod 755 fixcurentusers.sh
/scripts/fixcurentusers.sh
cd /root/
rm -rf /scripts/
rm -rf /root/svn.sh
touch /usr/local/directadmin/plugins/svn/commands.txt
chown -R diradmin:diradmin /usr/local/directadmin/plugins/svn
chmod 766 /usr/local/directadmin/plugins/svn/commands.txt
echo "* * * * * root /root/svn_execute.sh >/dev/null 2>&1" >> /etc/cron.d/svn_plugin
echo '#!/bin/sh' >> /root/svn_execute.sh
echo "echo -n > /usr/local/directadmin/plugins/svn/commands.sh" >> /root/svn_execute.sh
echo ""echo appoggio'#!/bin/sh'appoggio ">> /usr/local/directadmin/plugins/svn/commands.sh""" >> /root/svn_execute.sh
echo "cat /usr/local/directadmin/plugins/svn/commands.txt >> /usr/local/directadmin/plugins/svn/commands.sh" >> /root/svn_execute.sh
echo "echo 'exit 0;' >> /usr/local/directadmin/plugins/svn/commands.sh" >> /root/svn_execute.sh
echo "echo > /usr/local/directadmin/plugins/svn/commands.txt" >> /root/svn_execute.sh
echo "sh /usr/local/directadmin/plugins/svn/commands.sh" >> /root/svn_execute.sh
echo "rm -f /usr/local/directadmin/plugins/svn/commands.sh" >> /root/svn_execute.sh
echo "exit 0;" >> /root/svn_execute.sh
export appoggio=\'
sed -i 's/appoggio/'$appoggio'/' /root/svn_execute.sh
sed -i 's/shappoggio/sh'$appoggio'/' /root/svn_execute.sh
chmod 700 /root/svn_execute.sh
/etc/init.d/crond restart
For the svn_execute.sh suggest in post #4 i had to use a workaround cause im not such a good bash programmer, im pretty sure there is a better way to do this:
Code:
echo ""echo appoggio'#!/bin/sh'appoggio ">> /usr/local/directadmin/plugins/svn/commands.sh""" >> /root/svn_execute.sh
export appoggio=\'
sed -i 's/appoggio/'$appoggio'/' /root/svn_execute.sh
sed -i 's/shappoggio/sh'$appoggio'/' /root/svn_execute.sh
Anyone who is able and want to fix it, feel free to do that
On my own script i use to download directly the file from my own repository (same for all file) for be sure and cause i have pretty much cutomizated user_create_post domain_create post virtual_host2 and virtual_host2_secure.
Who have those alraedy customized as me shouldnt use this script cause it gonna OVERWRITE the existin one.
I would so much suggest to do as me, get the file apart, edit your own (or a copy of those in a subfolder like /svn) and make needed edits.
I use to have my own customization file and, if needed, i start svn.sh (this script) that re-download the customized script for svn (from a /svn) subfolder.
Also, this will take orignal file so you must do the edits on post #4, i have my own copy of the edited svn plugin with those edits already done.
Last thing, first install the plugin, then start this script!
Hope this is helpful
Regards