PDA

View Full Version : Nice!



UltimeWWW
10-24-2003, 11:43 AM
http://www.directadmin.com/features.php?id=183

Great job! Urchin integration is coming soon @ DA :)

Thanks :)

interfasys
12-22-2003, 06:46 PM
Did someone write such a script?

UltimeWWW
12-22-2003, 06:46 PM
I don't have the time to do so, probably after Christmas.

interfasys
12-22-2003, 08:32 PM
OK, thx!

ProWebUK
12-22-2003, 09:32 PM
Based on ensim although has been been customised for DirectAdmin

basically variables are:

$username - Username
$domain - Domain name

# mkdir urchin-automation
# cd urchin-automation
# pico -w urchin-add.sh

add the following:



#!/bin/sh

URCHINPATH="/usr/local/urchin"
OUTPUT="/tmp/urchin-temp.conf"

DOMAIN=$domain
USER=$username@$domain
PASSWORD="default_password"

echo "<Profile Name="$DOMAIN">" > $OUTPUT
echo " ct_name=$DOMAIN" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_website=http://www.$DOMAIN" >> $OUTPUT
echo " ct_reportdomains=www.$DOMAIN,$DOMAIN" >> $OUTPUT
echo " cs_llist=$DOMAIN-access-log,$DOMAIN-access-log.[1-4]" >> $OUTPUT
echo " ct_defaultpage=index.html" >> $OUTPUT
echo " cs_vmethod=0" >> $OUTPUT
echo " cs_ulist=$USER" >> $OUTPUT
echo "</Profile>" >> $OUTPUT
echo >> $OUTPUT
echo "<Task Name="$DOMAIN">" >> $OUTPUT
echo " ct_name=$DOMAIN" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " cr_frequency=4" >> $OUTPUT
echo " cr_minute=0" >> $OUTPUT
echo " cr_runnow=0" >> $OUTPUT
echo " cr_enabled=off" >> $OUTPUT
echo "</Task>" >> $OUTPUT
echo >> $OUTPUT
echo "<Logfile Name="$DOMAIN-access-log">" >> $OUTPUT
echo " ct_name=$DOMAIN-access-log" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_loglocation=/path/to/access_log" >> $OUTPUT
echo " cs_logformat=ncsa" >> $OUTPUT
echo " cr_type=local" >> $OUTPUT
echo " cs_rlist=$DOMAIN" >> $OUTPUT
echo "</Logfile>" >> $OUTPUT
echo >> $OUTPUT
echo "<Logfile Name="$DOMAIN-access-log.[1-4]">" >> $OUTPUT
echo " ct_name=$DOMAIN-access-log.[1-4]" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_loglocation=/path/to/access_log.[1-4]">> $OUTPUT
echo " cs_logformat=ncsa" >> $OUTPUT
echo " cr_type=local" >> $OUTPUT
echo " cs_rlist=$DOMAIN" >> $OUTPUT
echo "</Logfile>" >> $OUTPUT
echo >> $OUTPUT
echo "<User Name="$USER">" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_fullname="$DOMAIN"" >> $OUTPUT
echo " ct_name=$USER" >> $OUTPUT
echo " ct_password=$PASSWORD" >> $OUTPUT
echo " cs_rlist=$DOMAIN" >> $OUTPUT
echo "</User>" >> $OUTPUT

$URCHINPATH/util/uconf-import -f $OUTPUT


Set permissions



chmod 755 urchin-add.sh


Using DirectAdmin you then run:



/urchin-automation/urchin-add.sh


I would suggest using user_create_post.sh for this

The paths in bold need to be customised appropriately apart from that i think its pretty much done, feel free to play around with it test it whatever you want, and finally thanks to foggy over @ ev1 forums for creating a new thread with that how-to since the original site closed down i believe!

Please note also that i take no responsibility with the use of this :)

Chris

interfasys
12-22-2003, 09:45 PM
Can't wait to get some time to test this!

rldev
08-26-2004, 08:22 PM
Anything become of this?

interfasys
09-06-2004, 05:41 PM
Here are the paths to logs

Live:
echo " ct_loglocation=/var/log/httpd/domains/$domain.log" >> $OUTPUT


Archives:
echo " ct_loglocation=/home/$username/domains/$domain/logs/access_log.[1-4]">> $OUTPUT


I don't habe archives yet on that server, so if the filename is not access_log, please tell me and I'll update this post.