ispCP - Board - Support
The Maia Installscript - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Snippets (/forum-42.html)
+--- Thread: The Maia Installscript (/thread-1565.html)

Pages: 1 2 3 4 5


RE: The Maia Installscript - joximu - 10-19-2007 09:40 PM

Akismet is a noob!


RE: The Maia Installscript - BeNe - 10-19-2007 11:12 PM

Looks like that the script is growing in the wiki [Image: g030.gif]

Greez BeNe


RE: The Maia Installscript - BeNe - 10-20-2007 12:09 AM

Ok - i am done for today with the script!
No more time *damn* [Image: c005.gif]

Maybe joximu or someone other can go on with the work ?!
Hope that it is a good way how we do it - not that it is unusableRolleyes

Greez BeNe


RE: The Maia Installscript - joximu - 10-20-2007 12:49 AM

I can do some questions about database users and so on - so we can use the variables in the script...

/J


RE: The Maia Installscript - ephigenie - 10-20-2007 01:03 AM

I made the submission (askimet is only noob if you're unregistered in the trac ... )

FYI i changed that Wink


RE: The Maia Installscript - joximu - 10-20-2007 01:07 AM

@BeNE:
what do you think, can we go this way:

Code:
echo "We ask some details about MySQL and the maia user"
ok=0
while [ "$ok" = "0" ]; do
        read -ep "Do you want this script to create the maia user in MySQL? [y/n] " crDbMaUser
        for a in Y y; do
                if [ "$crDbMaUser" = "$a" ]; then crDbMaUser=y; ok=1; fi
        done
        for a in N n; do
                if [ "$crDbMaUser" = "$a" ]; then crDbMaUser=n; ok=1; fi
        done
done

# ask the MySQL root user
if [ "$crDbMaUser" = "y" ]
then
        ok=0
        while [ "$ok" = "0" ]; do
                read -ep "Username of a mysql root user?, eg. 'root': " dbRtUser
                read -ep "Password for this user?: " dbRtPass
                read -ep "again... to be sure... : " dbRtPass2
                if [ "$dbRtPass" = "$dbRtPass2" ]; then ok=1; fi
        done
fi

# ask the MySQL maia user
ok=0
while [ "$ok" = "0" ]; do
        read -ep "Username of the mysql maia user?, eg. 'maia' or 'ispcp-maia': " dbMaUser
        read -ep "Password for this user?: " dbMaPass
        read -ep "again... to be sure... : " dbMaPass2
        if [ "$dbMaPass" = "$dbMaPass2" ]; then ok=1; fi
done

I think it's a good start, we then have all database infos in variables... (and can send them to our headquater - hehe :-)

I'm continuing on this...

/J


RE: The Maia Installscript - raphael - 10-20-2007 05:45 AM

Quote:HERE WE SHOULD REMOVE THE "#" IN FRONT OF content_filter = amavis:[127.0.0.1]:10024 in main.cf
# BUT HOW TO DO THIS THE BEST WAY ?
sed -i "s/#[ \t]*content_filter/content_filter" /path/to/file


RE: The Maia Installscript - joximu - 10-20-2007 08:13 AM

raphael Wrote:
Quote:HERE WE SHOULD REMOVE THE "#" IN FRONT OF content_filter = amavis:[127.0.0.1]:10024 in main.cf
# BUT HOW TO DO THIS THE BEST WAY ?
sed -i "s/#[ \t]*content_filter/content_filter" /path/to/file

Since we change the main.cf and we don't know if the user has many lines with #content_filter... (and not always with 10024) I think it's better to check the whole line - the sample above was a start - there is much more in the wiki...


RE: The Maia Installscript - BeNe - 10-21-2007 01:25 AM

Quote:@BeNE:
what do you think, can we go this way:
Yes, this looks good.
Quote:Since we change the main.cf and we don't know if the user has many lines with #content_filter... (and not always with 10024) I think it's better to check the whole line - the sample above was a start - there is much more in the wiki...
I am with you...so we have for sure the right line

Thanks @raphael for take a look at it.

Greez BeNe


RE: The Maia Installscript - BeNe - 10-21-2007 04:57 AM

We have around 480 lines in 3 Days!
This is more than good... [Image: d055.gif]

I will create the base structure to the end and then go on and help joximu with the more heavy parts...Rolleyes

Hope that somebody with enough skills can help here that we can bring it to the end. I marked them in the Script with "##"

Greez BeNe