Current time: 11-16-2024, 09:51 PM Hello There, Guest! (LoginRegister)


Post Reply 
The Maia Installscript
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #11
RE: The Maia Installscript
Akismet is a noob!
10-19-2007 09:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #12
RE: The Maia Installscript
Looks like that the script is growing in the wiki [Image: g030.gif]

Greez BeNe
10-19-2007 11:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #13
RE: The Maia Installscript
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
10-20-2007 12:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #14
RE: The Maia Installscript
I can do some questions about database users and so on - so we can use the variables in the script...

/J
10-20-2007 12:49 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #15
RE: The Maia Installscript
I made the submission (askimet is only noob if you're unregistered in the trac ... )

FYI i changed that Wink
10-20-2007 01:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #16
RE: The Maia Installscript
@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
10-20-2007 01:07 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #17
RE: The Maia Installscript
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
10-20-2007 05:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #18
RE: The Maia Installscript
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...
10-20-2007 08:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #19
RE: The Maia Installscript
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
10-21-2007 01:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #20
RE: The Maia Installscript
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
10-21-2007 04:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 10 Guest(s)