Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: beckynet on May 14, 2010, 10:40:35 AM

Title: Help : How to create an ibay from a bash script
Post by: beckynet on May 14, 2010, 10:40:35 AM
Hello World I need your Help,

I want to create an ibay from a bash script, if this ibay don't exist.

I've find this topic but no respons to it http://forums.contribs.org/index.php?topic=24552.0 (http://forums.contribs.org/index.php?topic=24552.0)

Thanks a lot

Olivier Beeckmans
Title: Re: Help : How to create an ibay from a bash script
Post by: Knuddi on May 14, 2010, 07:35:30 PM
Look here.

http://wiki.contribs.org/Lazy_Admin_Tools
Title: Re: Help : How to create an ibay from a bash script
Post by: beckynet on May 14, 2010, 10:03:06 PM
Thanks for your respons, but I search a solution that run with SME Basic Installation.

I don't know if it's permited ? Thanks to SME guru to respons

Olivier Beeckmans
Title: Re: Help : How to create an ibay from a bash script
Post by: cactus on May 14, 2010, 10:12:14 PM
Thanks for your respons, but I search a solution that run with SME Basic Installation.
There is no bash command line option by default, lat could be helpful for your desire.

I don't know if it's permited ? Thanks to SME guru to respons
It is your server isn't it? :-)
Title: Re: Help : How to create an ibay from a bash script
Post by: Stefano on May 14, 2010, 10:12:44 PM
well, Olivier.. just take a look on how lat scripts work and then use them as an example

everything you need is there
Title: Re: Help : How to create an ibay from a bash script
Post by: beckynet on May 15, 2010, 02:40:54 PM
well, Olivier.. just take a look on how lat scripts work and then use them as an example

everything you need is there

Good Idea, I'm going to analyse lat-ibays

Thanks

Olivier Beeckmans
Title: Re: Help : How to create an ibay from a bash script
Post by: soprom on May 30, 2010, 05:40:22 PM

The only problem is this part:

Code: [Select]
my $uid;
if ($fields[7]) { $uid = $fields[7]; }
 else { $uid = &FindUid;}

How to obtain a new uid from the command line?

Reading the source of lazy script, I can get these example lines:

Code: [Select]
ibayname = "myibay"
ibaygrp  = "admin"
ibayusa  = "wr-admin-rd-group"
ibaypub  = "local-pw"
ibaypwd  = "no"
ibaycgi  = "disabled"
ibayUid  = ?
ibayGid  = $ibayGid

db accounts set     $ibayname ibay
db accounts setprop $ibayname Name         $ibayname
db accounts setprop $ibayname Group        $ibaygrp
db accounts setprop $ibayname UserAccess   $ibayusa
db accounts setprop $ibayname PublicAccess $ibaypub
db accounts setprop $ibayname Uid          $ibayUid
db accounts setprop $ibayname Gid          $ibayGid

/sbin/e-smith/signal-event ibay-create $ibayname