PDA

View Full Version : user_create_post.sh


dannygoh
07-17-2006, 11:52 PM
Hi,

I would like to enable spamassassin and awstats for new account.

Spamassassin

#!/bin/sh
if [ "$spam" = "ON" ]; then
DIR=/home/$username/.spamassassin
mkdir $DIR
touch $DIR/user_prefs #or this is where you'd copy the default user_prefs you want them to have, instead of "touch".
chown ${username}:mail $DIR
chmod 771 $DIR
chown $username:$username $DIR/user_prefs
chmod 755 $DIR/user_prefs
touch $DIR/spam
chown mail:$username $DIR/spam
chmod 660 $DIR/spam
fi
exit 0;


AWSTATS

echo $username >> /usr/local/directadmin/plugins/awstats/hooks/permissions.txt


How do i join these 2 command?

hehachris
07-18-2006, 04:45 AM
just put
echo $username >> /usr/local/directadmin/plugins/awstats/hooks/permissions.txt

before
exit 0;