Koozali.org: home of the SME Server

Help : How to create an ibay from a bash script

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Help : How to create an ibay from a bash script
« 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

Thanks a lot

Olivier Beeckmans
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------


Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: Help : How to create an ibay from a bash script
« Reply #2 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
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Help : How to create an ibay from a bash script
« Reply #3 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? :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Help : How to create an ibay from a bash script
« Reply #4 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

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: Help : How to create an ibay from a bash script
« Reply #5 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
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Help : How to create an ibay from a bash script
« Reply #6 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




Sophie from Montréal