user_create_post.sh

dannygoh

Verified User
Joined
Feb 9, 2004
Messages
368
Location
Malaysia
Hi,

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

Spamassassin
Code:
#!/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
Code:
echo $username >> /usr/local/directadmin/plugins/awstats/hooks/permissions.txt

How do i join these 2 command?
 
just put
Code:
echo $username >> /usr/local/directadmin/plugins/awstats/hooks/permissions.txt

before
Code:
exit 0;
 
Back
Top